如何更改禁用输入的字体颜色? [英] How to change font-color for disabled input?

查看:49
本文介绍了如何更改禁用输入的字体颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要更改 CSS 中禁用的输入元素的样式.

I need to change the style for a disabled input element in CSS.

<input type="text" class="details-dialog" disabled="disabled" />

如何为 Internet Explorer 执行此操作?

How I can do this for Internet Explorer?

推荐答案

您不能使用 Internet Explorer.

You can't for Internet Explorer.

请参阅此评论 我写了一个相关的话题:

See this comment I wrote on a related topic:

好像没有什么好办法,看:如何在 IE8 中使用 css 更改禁用的 html 控件的颜色- 您可以将输入设置为 readonly 代替,但还有其他结果(例如使用 readonlyinput 将被发送到服务器提交时,但在 disabled 的情况下,它不会是):http://jsfiddle.net/wCFBw/40

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

另请参阅:更改IE 中被禁用的文本框中的字体颜色

这篇关于如何更改禁用输入的字体颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆