我正在尝试使用以下css禁用它们时更改输入控件的颜色.
input[disabled='disabled']{
color: #666;
}
Run Code Online (Sandbox Code Playgroud)
这适用于大多数浏览器,但不适用于IE.我可以更改任何其他样式属性,如背景颜色,边框颜色等...只是不颜色.有谁能解释一下?
我注意到你可以改变文本框中文本的颜色,这些文本框在Firefox中应用了一个简单的类但是在IE 6/7中无法实现.有没有人有一个优雅的解决方案来实现这一目标.
示例:http://jsfiddle.net/wCFBw/25/

input {
color: black;
}
Run Code Online (Sandbox Code Playgroud)
<input type="text" value="This is black" />
<input type="text" disabled="disabled" value="Why this is not black?" />
Run Code Online (Sandbox Code Playgroud)