html - 仅在 IE-10 及以上浏览器中更改禁用的选择元素的字体颜色

标签 html css browser

仅在 IE-10 及以上浏览器中更改禁用的选择元素的字体颜色 请找到以下 html 标记:

HTML:
<select disabled="disabled">
<option>One</option>
<option>Two</option>
<option>Three</option>
</select>

CSS :

select[disabled='disabled']{
    background-color:#FFF;
    color: #000; 
}

最佳答案

can't use conditional comments所以下一个最佳选择似乎是:

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {  
   /* IE10+ specific styles go here */  
}

来源: CSS Hacks for Targeting IE 10 and Above

关于html - 仅在 IE-10 及以上浏览器中更改禁用的选择元素的字体颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32986221/

相关文章:

html - 为什么连接速度慢的浏览器会显示原始 html(而不是解释它)?

javascript - AngularJS 在文本区域中渲染 HTML

javascript - 在文档片段: Failed to execute 'insertAdjacentHTML' on 'Element' : The element has no parent中

javascript - 未点击时显示 div 元素的点击功能

html - Firefox 打印表在第二页

browser - 在浏览器上禁用缓存而不在 Varnish 上禁用它

php - 发布变量值而不是变量名称

html - Css Wrapper 和容器 Div 自动高度?

html - Tumblr 提问框显示互动

javascript - 设计适用于除 IE 以外的所有浏览器