我需要更改 CSS 中禁用的输入元素的样式。
<input type="text" class="details-dialog" disabled="disabled" />
如何为 Internet Explorer 执行此操作?
最佳答案
不能用于 Internet Explorer。
参见 this comment我写了一个相关主题:
There doesn't seem to be a good way, see: How to change color of disabled html controls in IE8 using css - you can set the input to
readonly
instead, but that has other consequences (such as withreadonly
, theinput
will be sent to the server on submit, but withdisabled
, it won't be): http://jsfiddle.net/wCFBw/40
另请参阅:Changing font colour in Textboxes in IE which are disabled
关于css - 如何更改禁用输入的字体颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6186989/