IE6下的PNG图片的透明是个老问题了,前几天也为此而烦恼,不过现在搜到个十分简单的解决方法,只需要一个的JS文件和一个1*1象素的GIF图片即可。
Unit PNG Fix
Waaaaah! Waaaaaah! You hear that? That’s IE6 whining about how you should be using an obtuse “filter” attribute, causing all those nice, pretty pngs on your page to go whacky. Fortunately for you, we got just the thing to shut it up. Give it just the tiniest dose of our Unit PNG Fix and bask in the the glorious phosphoresence of your png images once again! While this is not the only png fix out there (in fact, it was inspired by Drew McLellan’s supersleight), here’s why it will be the last one you need to download:
- Very compact javascript: Under 1kb!
- Fixes some interactivity problems caused by IE’s filter attribute.
- Works on img objects and background-image attributes.
- Runs automatically. You don’t have to define classes or call functions.
- Allows for auto width and auto height elements.
- Super simple to deploy.
Demo | 下载地址:http://labs.unitinteractive.com/downloads/unitpngfix.zip
IE PNG Fix也是一个类似的解决方案:
This script adds near-native PNG support with alpha opacity to IE 5.5 and 6. Now you can have full translucency and no more ugly grey borders! It requires only one line in your CSS file, and no changes to your website HTML. <IMG> tags and background images are both supported.
Demo | 下载地址:http://www.twinhelix.com/css/iepngfix/iepngfix.zip
两个下载地址是一样的。
谢谢指正
这不简单 就是说解决IE的PNG问题有两个解决方案
一个是Unit PNG Fix
一个是IE PNG Fix
不过这家伙好懒,直接Copy官网的介绍
好吧…我是各种懒- -#
鸟语盲。。抱歉,没看懂~ 你应该 帮忙解释下!
Pingback 引用通告:Fwolf’s Blog » Blog Archive IE 6.0仍然无法显示PNG图片文件的原貌? - Fwolf's Blog
这个... 有点古老恩 - -.
还真点两下了啊 :-
:O 这什么意思呢?我点两下进来滴~~