;css代码:.wby{height: 90px;width: 90px;background-image:&" />
方法一:给div增加样式:
html代码:
;
css代码:
.wby{
height: 90px;
width: 90px;
background-image: url(img.png)!important;/* FF IE7 */
background-repeat: no-repeat;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img.png'); /* IE6 */
_ background-image: none; /* IE6 */
}
方法二:给img增加样式:
html代码:
css代码:
.wby img {
azimuth: expression(
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 = "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);
方法三:第三方js实现:
上面js源文件大家可以在百度直接搜索关键词“ie3 png透明js”就可以了
以上就是先阶段比较好用的ie6透明方法 ,希望对大家有所帮助