Firefox 48删除了选择元素的样式吗? [英] Did Firefox 48 remove ability to style the select element?

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

问题描述

他们已经取消了使用CSS设计选择元素的能力吗?

以前我有一个选择元素样式因为这样





现在在Forefox 48它看起来像这样。





有没有一种方法可以在Firefox 48中使用CSS进行设置?有没有从Firefox这个声明,我找不到任何信息?
解决方案

这似乎是为我做的伎俩。
$ b

CSS
$ b

 选项{
-moz-appearance:none;
}
option.active {
background:black;
颜色:橙色;

$ / code>

HTML

 <选择> 
< option> - 选择一个页面 - < / option>
< option class =active>主页< / option>
< option>关于我们< / option>
< option>露营小贴士< / option>
< / select>

jsFiddle



*无法从Mozilla中找到有关此事的声明。

It seems like with the latest version of Firefox (48) they have removed the ability to style select option elements with CSS?

Previously I had a select element styled as such

Now in Forefox 48 it looks like this.

Is there a way to style this using CSS in Firefox 48? Is there are statement from Firefox on this, I could not find any information?

解决方案

This seemed to do the trick for me. -moz-appearance: none; opens up the element for slight modifications:

CSS

option {
  -moz-appearance: none;
}
option.active {
  background: black;
  color: orange;
}

HTML

<select>
  <option>- Select a Page -</option>
  <option class="active">Home Page</option>
  <option>About Us</option>
  <option>Camping Tips</option>
</select>

jsFiddle

*Could not find a statement from Mozilla about this.

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

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