样式选择选项 [英] Styling select options

查看:117
本文介绍了样式选择选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个:

我希望高亮和选项框周围的边框不是蓝色,这似乎是系统默认值。有没有办法通过CSS样式的选择选项,或者系统控制这个?

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.

我对jQuery解决方案不感兴趣(已经使用jQuery Uniform,我很高兴)。我不关心它在所有浏览器中看起来是一样的。即使只能定位某些浏览器(Firefox和Chrome),我也会感到满意。

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.

推荐答案

可能因为选择颜色是操作系统特定的,而不是浏览器。你将不得不诉诸一些Javascript库,让你这样做。

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.

这样的东西可能有帮助,但正如你所说,你对JS解决方案不感兴趣,不幸的是你必须生活在蓝色的

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,

这篇关于样式选择选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆