0

我为一个站点继承了以下 CSS,但我不知道它是否有任何用处。如果 IE 版本小于 8,它会作为 IE 特定包含在内。所以我的猜测是它试图处理 IE < 8 的 PNG。但它是否真的这样做我不知道。

此外,一些机器人正在尝试跟踪链接/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));}
}
4

1 回答 1

1

它无效,但它可能有用。一些 CSS hack 需要无效的 CSS 来在特定浏览器上强制执行特定行为,同时保持其他人不变。

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

It seems to me that this CSS is to allow transparent PNG images. I think those were not supported in IE6. So if you still need to support IE6, you might still need this, but I wouldn't.

于 2012-05-02T06:41:16.850 回答