HTML SELECT的OPTION上的HTML字体粗细属性 [英] HTML font weight property on OPTION of HTML SELECT

查看:545
本文介绍了HTML SELECT的OPTION上的HTML字体粗细属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

font-weight : bold不适用于Internet Explorer中的HTML SELECT选项,还有其他方法可以在HTML SELECT选项上指定粗体类型属性.

font-weight : bold not works on Option of HTML SELECT in Internet Explorer , is there any other way to specify bold type attribute on option of HTML SELECT.

.test {
    color:black !important;
    font-weight:bold !important;
}
.test1 {
    margin-left:10px !important;
}

 <select  ng-model="fields[filter.id]" style="width:200px;">
  <option value="">--- Select ---</option>
  <option class="test">zero</option>
  <option class="test1">one</option>
 </select>

这些css样式在Firefox中有效,但在chrome和IE中无效:(

These css styles are working in Firefox but having no effect in chrome and IE :(

推荐答案

只需使用

select{
    font-weight: bold;
}

<select>
  <option>aaa</option>
  <option>bbb</option>
</select>

应该工作.小提琴: http://jsfiddle.net/NQxRA/1

这篇关于HTML SELECT的OPTION上的HTML字体粗细属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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