验证IE特定CSS

时间:2012-05-02 06:31:25

标签: css internet-explorer

我为网站继承了以下CSS,我无法判断它是否有用。如果IE版本小于8,它将作为IE特定包含在内。所以我的猜测是它尝试处理IE的<但是,它是否确实如此,我不知道。

此外,一些机器人正在尝试关注/Content/','').replace('链接,我认为这是他们如何阅读其中replace的行。我不知道它的机器人是否无法读取这个CSS或者CSS是否是垃圾。

如果有人可以请说明这个CSS是否有效且有用。感谢。

* html #nav li { z-index: expression( runtimeStyle.zIndex = 1, this == parentNode.firstChild ? (className += " first-child") : 0 );}
* html .tabs-container .t{
    background-position:-9999px -9999px;
    filter: progid:dximagetransform.microsoft.alphaimageloader(src='images/bg-tabs-container-t.png', sizingmethod='crop');
}
* html .tabs-container .c {
    background-position:-9999px -9999px;
    filter: progid:dximagetransform.microsoft.alphaimageloader(src='images/bg-tabs-container-c.png', sizingmethod='scale');
}
* html .tabs-container .b {
    background-position:-9999px -9999px;
    filter: progid:dximagetransform.microsoft.alphaimageloader(src='images/bg-tabs-container-b.png', sizingmethod='crop');
}
* html .png{
behavior: expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "', sizingMethod='image')",
this.src = "images/transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "', sizingMethod='crop')",
this.runtimeStyle.backgroundImage = "none")),this.pngSet=true));}
}

1 个答案:

答案 0 :(得分:1)

它无效,但可能有用。一些CSS黑客需要无效的CSS来强制执行特定浏览器上的特定行为,同时保持其他浏览器不受影响。

如果删除它会有什么变化吗?如果没有,它没用。 :)

在我看来,这个CSS是允许透明的PNG图像。我认为IE6不支持这些。所以如果你仍然需要支持IE6,你可能仍然需要这个,但我不会。