Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html Can';t在IE中将锚定标签设置为[禁用]_Html_Css_Internet Explorer - Fatal编程技术网

Html Can';t在IE中将锚定标签设置为[禁用]

Html Can';t在IE中将锚定标签设置为[禁用],html,css,internet-explorer,Html,Css,Internet Explorer,我有下面的css代码。 png是一个图像,其中3个按钮状态被垂直粘贴,所以我只是在css中移动图像 a.button { background-image: url(button.png); background-position: 0px 0px; width: 100px; height: 30px; display: block; background-r

我有下面的css代码。 png是一个图像,其中3个按钮状态被垂直粘贴,所以我只是在css中移动图像

a.button
{
    background-image: url(button.png);
    background-position: 0px 0px;
    width: 100px;                                            
    height: 30px;
    display: block;
    background-repeat: no-repeat;
    text-indent: -9999px;
}
a:hover.button
{
    background-position: -100px 0px;
}
a.button[disabled]
{
    background-position: -200px 0px;
    cursor:default;
}
我把它放在html中

<a href="#" class="button" disabled="disabled"></a>


在镀铬中,一切正常。IE不显示已禁用的图像。

IE 6无法处理属性选择器

IE7和IE8应该能够处理
a.button[disabled=disabled]

为了完全兼容,您必须向“禁用”按钮添加一个类:

a.button[disabled],
a.disabled
{
...
}

<a href="#" class="button disabled" disabled="disabled"></a>
a.按钮[已禁用],
a、 残废
{
...
}

什么IE-属性选择器在IE6中不受支持,其他的则需要doctype。

如果您可以假设您的用户将使用javascript,您可以使用ie7.js提供缺少的选择器

@Alex我不明白您的意思?