如何更改FireFox中悬停选择选项的颜色 [英] How to change the Color of the hovered Select-Option in FireFox

查看:133
本文介绍了如何更改FireFox中悬停选择选项的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想改变FireFox中的悬浮选择选项的颜色,该选项有默认的蓝色背景和白色前景。


$ b

 < select name =selectsize =1> 
< option> 0< / option>
< option class =test> 1< / option>
< option> 2< / option>
< option> 3< / option>
< option> 4< / option>
< / select>

  .test:hover {
color:green;
background-color:yellow;
text-decoration:underline;
}

但它不工作。请参见示例

FireFox特定解决方案就足够了。

解决方案

我发现我可以将图像设置为背景。



a href =http://jsfiddle.net/oliholz/zagzH/8/ =nofollow> jsfiddle demo



但它只是绘制:悬停,当我退出鼠标从系统呈现的选项。


I want to change the Color of the hovered Select-Option in FireFox which has default blue background and white foreground.

I tried:

<select name="select" size="1">
   <option>0</option>
   <option class="test">1</option>
   <option>2</option>
   <option>3</option>
   <option>4</option>
</select>

.test:hover {
    color:green;
    background-color:yellow;
    text-decoration:underline;
}

But it doesn't work. See Example.
A FireFox specific solution is sufficient.

解决方案

I found out that I can set an Image as Backround.

jsfiddle demo

But it is only painted on :hover, when I exit the mouse from the option it will by system rendered.

这篇关于如何更改FireFox中悬停选择选项的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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