styling HTML form list box with CSS or jQuery

2019-03-06 11:56发布

问题:

I want to simply change the colors and define the edges of a multiple line select box, or list box.

I have seen a few threads on similar subjects, but not quite the solutions I am looking for. I need to be able to:

  • Change hover color of elements
  • Change select color of elements
  • Change border
  • Style side slider (not essential)

I think I might have to use JS (via jQuery, if possible), but would much rather use CSS is I can.

Here is what I mean by a list box

回答1:

there is no possibility to do this just with CSS. Take a look at this plugin: github.com/vladfr/jquery-coolmultiple



回答2:

Try these

http://www.devirtuoso.com/2009/08/styling-drop-down-boxes-with-jquery/

http://www.adamcoulombe.info/lab/jquery/select-box/

EDIT:

Use this jQuery SelectBox plugin

The output will be like this