我想在禁用控件时更改其背景颜色。为此,我正在使用:
在CSS文件中
input[type="text"]:disabled{background:red;}
在 Html 文件中
<input tyepe="text" disabled="" >
它在 Chrome 和 Mozilla 上正常工作,但在 Internet Explorer 中无法工作。
我该如何解决这个问题。
谢谢。
最佳答案
只有 IE9+ 支持 :disabled
伪选择器,如 MSDN文档。 IE7+ 支持 CSS 属性选择器:
input[type="text"][disabled] {
background: red;
}
关于css - 输入[类型="text"]:disabled not working for IE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17809321/