Styling select options

两盒软妹~` 提交于 2019-11-28 05:41:02

问题


I have this:

I would like the highlight and the border around the options box not to be blue, which seems to be the system default. Is there a way to style the select options via CSS, or does the system control this?

As you can see, I was able to style the background and the font, it's just the annoying blue colour that bugs me.

I'm not interested in jQuery solutions (already using jQuery Uniform and I'm quite happy with it). I don't care about it looking the same across all browsers. Even if only certain browsers (Firefox & Chrome) can be targeted, I'll be satisfied.


回答1:


This isn't possible as the select color is OS specific, not browser. You will have to resort to some Javascript library to allow you to do this.

Something like this might help, but as you said you're not interested in JS solutions, unfortunately you'll have to live with the blue,



来源:https://stackoverflow.com/questions/4789295/styling-select-options

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!