开发者

ie6 png transparent not working

<img src="/images/home-1a.png" id ="tab66"  alt="home" />

#tab66 {
 margin-left:0px;
开发者_运维百科 filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(...);
}

This is my code of png image in ie6 but still it does not show transparency


Try this jQuery plugin: http://allinthehead.com/retro/338/supersleight-jquery-plugin

That said you should avoid having to use this hack in the first place.
Use .GIF's unless you really have to use PNG


body{ background: #0D657B;}
.png_hack {
  margin:0 auto;
  width:400px;
  height:100px;
  background-image: url(Img/png.png) !important;
  background-image: none;
  filter: none !important;
  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='Img/png.png');
}

it's works http://www.newstyleonline.net/post/ie6-png-hack.html


That is because AlphaImageLoader works like background-image, showing behind the image inside the img tag - the most common trick here is replacing src="/images/home-1a.png" with a 1x1 pixels transparent gif.

A quicker solution for you here would be:

<div id="tab66"></div>

#tab66 {
 margin-left:0px;
 filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(...);
 width: Xpx;
 height: Ypx;
}

if you want to automate this, I'd recommend instead DD_belatedPNG.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜