如何在IE8中使用css更改禁用的html控件的颜色 [英] How to change color of disabled html controls in IE8 using css

查看:121
本文介绍了如何在IE8中使用css更改禁用的html控件的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用以下css禁用时更改输入控件的颜色。

I'm trying to change the color of input controls when they are disabled using the following css.

input[disabled='disabled']{
  color: #666;     
}

这适用于大多数浏览器,但不适用于IE。我可以更改任何其他样式属性,如背景颜色,边框颜色等...只是不是颜色。

This works in most browsers, but not IE. I'm able to change any of the other style properties such as background-color, border-color, etc... just not color. Can anyone explain this?

推荐答案

不幸的是,如果你使用disabled属性,无论你尝试IE只是默认的颜色文本到灰色,有一个奇怪的白色阴影...事情...但所有其他样式仍然可以工作。 : - /

Unfortunately if you use the disabled attribute, no matter what you try IE will just default the color of the text to Grey, with a weird white shadow...thing... yet all other styles will still work. :-/

这篇关于如何在IE8中使用css更改禁用的html控件的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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