IE6 背景图像未显示



我正在尝试为出于某种原因仍然使用此浏览器的人设置ie6样式。我遇到的问题是背景图像没有显示。路径是正确的,当我在浏览器中输入完整路径时,会显示图像。我的代码哪里出错了。谢谢

.buttonMailTrue:hover {
    background-image: url('http://localhost/sample/users/images/mail_icon_strip_hover.gif');
    background-repeat: no-repeat;
    width:290px;
    height:44px;
    color: black;
}

悬停仅适用于 ie6 中的链接。

IE6 仅支持 :悬停在链接上。所以你必须做这样的事情:

.CSS:

.buttonMailTrue.hover {
    background-image: url('http://localhost/sample/users/images/mail_icon_strip_hover.gif');
    background-repeat: no-repeat;
    width:290px;
    height:44px;
    color: black;
}

Javascript(with jQuery):

$('.buttonMailTrue').hover(function() {
    $(this).addClass('hover');
}, function() {
    $(this).removeClass('hover');
});

我已经在头部和外部js文件中尝试过,但仍然无法正常工作。

尝试内部<script type="text/javascript" rel="JavaScript">//code here</script>

最新更新