覆盖禁用输入的IE默认CSS [英] Overriding IE default CSS for disabled inputs

查看:71
本文介绍了覆盖禁用输入的IE默认CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

IE 7将其自己的字体颜色应用于禁用的输入。

解决方案

给你的输入一个类并通过css添加样式。 / p>

Html:

 < input class =disdisabled = disabledvalue =something>< / input> 

CSS

  .dis {color:red;} 

工作示例: http://jsfiddle.net/TQUhD/1



如Diodeus评论:在IE中不支持禁用: http://reference.sitepoint.com/css/pseudoclass-disabled


IE 7 applies its own font color to disabled inputs. How can I override this and set my own font color?

解决方案

Give your input a class and add the styling via css.

Html:

 <input class="dis" disabled="disabled" value="something"></input>

CSS

.dis{color:red;}

Working Example: http://jsfiddle.net/TQUhD/1

As Diodeus comments :disabled is not supported in IE: http://reference.sitepoint.com/css/pseudoclass-disabled

这篇关于覆盖禁用输入的IE默认CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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