Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

html - Styling select options

I have this:

Annoying blue border and highlight

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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,


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...