/*第一种方法:通过滤镜 使用css解决的办法。 注意滤镜下的1像素透明gif的覆盖图片的路径是相对页面写的*/
.banner 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 = "img/blank.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脚本方法
function fixPng() {解决ie6下png背景不能透明bug,布布扣,bubuko.com
原文:http://www.cnblogs.com/liujinyu/p/3578004.html