用于禁用输入类型的CSS选择器=“提交". [英] CSS selector for disabled input type="submit"

查看:156
本文介绍了用于禁用输入类型的CSS选择器=“提交".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有CSS选择器用于禁用的input type="submit""button"?

Is there a CSS selector for disabled input type="submit" or "button"?

我应该只使用input[type="submit"][disabled]吗?

在IE6中可以使用吗?

Does that work in IE6?

推荐答案

在IE6中可以使用吗?

Does that work in IE6?

否, IE6根本不支持属性选择器,请参见. CSS兼容性和Internet Explorer .

No, IE6 does not support attribute selectors at all, cf. CSS Compatibility and Internet Explorer.

您可能会找到 如何解决:IE6不支持值得阅读的CSS属性"选择器 .

You might find How to workaround: IE6 does not support CSS "attribute" selectors worth the read.

编辑
如果您要忽略IE6,可以这样做(CSS2.1):

EDIT
If you are to ignore IE6, you could do (CSS2.1):

input[type=submit][disabled=disabled],
button[disabled=disabled] {
    ...
}

CSS3(IE9 +):

CSS3 (IE9+):

input[type=submit]:disabled,
button:disabled {
    ...
}

可以[disabled](属性存在)替换[disabled=disabled](属性值).

You can substitute [disabled=disabled] (attribute value) with [disabled] (attribute presence).

这篇关于用于禁用输入类型的CSS选择器=“提交".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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