css - 如何更改禁用输入的字体颜色?

标签 css internet-explorer input

我需要更改 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 with readonly, the input will be sent to the server on submit, but with disabled, 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/

相关文章:

HTML/CSS :Focus Selector and Tab Key Not Working in Firefox/Windows 7

html - 如何在不中断的情况下在网站上播放视频作为背景?

javascript - 如何保持一个div的右边缘与另一个div的右边缘相同

internet-explorer - 阻止 IE 浏览我的网站?

android - 如何使用 InputConnectionWrapper?

python - 使用输入函数从作业数组中选择一个值

javascript - 在 jquery-ui sortable 中移动元素时更改元素样式

html - 强制 Internet Explorer 9 使用标准文档模式

internet-explorer - IE、P3P、IFrame 和阻止的 cookie(在页面主机页面请求个人信息之前有效)

Javascript限制输入文件上传的文件数量