我已经建立this fiddle为我做的一个例子。选择选项字体大小
我所试图做的Firefox中正常工作。当您打开选择选项时,字体大小为14px。
然而,在谷歌浏览器中查看它会选择继承的字体大小34px。
我理想的选择是选择字体大小14px。
这可能吗?
我愿意在任何jQuery的相关修复程序,应符合规定。
感谢
上市下面代码......
我CSS是:
.styled-select {
overflow: hidden;
height: 74px;
float: left;
width: 365px;
margin-right: 10px;
background: url(http://i50.tinypic.com/9ldb8j.png) no-repeat right center #5c5c5c;
}
.styled-select select {
font-size: 34px;
border-radius: 0;
border: none;
background: transparent;
width: 380px;
overflow: hidden;
padding-top: 15px;
height: 70px;
text-indent: 10px;
color: #ffffff;
-webkit-appearance: none;
}
.styled-select option.service-small {
font-size: 14px;
padding: 5px;
background: #5c5c5c;
}
HTML标记:
<div class="styled-select">
<select class="service-area" name="service-area">
<option selected="selected" class="service-small">Service area?</option>
<option class="service-small">Volunteering</option>
<option class="service-small">Partnership & Support</option>
<option class="service-small">Business Services</option>
</select>
</div>
的可能的复制[?如何风格选择标签的选项元素(http://stackoverflow.com/questions/5887133/how-to -style-a-select-tags-option-element) – TylerH 2015-11-29 23:40:33