惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
SegmentFault 最新的问题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Attack and Defense Labs
Attack and Defense Labs
F
Full Disclosure
Vercel News
Vercel News
N
News | PayPal Newsroom
The GitHub Blog
The GitHub Blog
H
Hacker News: Front Page
H
Heimdal Security Blog
P
Privacy International News Feed
博客园 - 司徒正美
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cisco Blogs
L
Lohrmann on Cybersecurity
D
Docker
Recent Announcements
Recent Announcements
Security Archives - TechRepublic
Security Archives - TechRepublic
人人都是产品经理
人人都是产品经理
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Proofpoint News Feed
T
Tailwind CSS Blog
C
Check Point Blog
博客园 - 叶小钗
Google Online Security Blog
Google Online Security Blog
Martin Fowler
Martin Fowler
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
S
Secure Thoughts
博客园 - Franky
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
P
Palo Alto Networks Blog
Latest news
Latest news
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 三生石上(FineUI控件)
The Cloudflare Blog
Last Week in AI
Last Week in AI
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Cyberwarzone
Cyberwarzone
小众软件
小众软件
Cisco Talos Blog
Cisco Talos Blog
Hacker News: Ask HN
Hacker News: Ask HN
T
Threatpost
T
Tenable Blog
P
Privacy & Cybersecurity Law Blog
WordPress大学
WordPress大学

博客园 - 布瓜去旅行

适时放手,是对自己的尊重 PhoneGap初试! 【转】Swift之 ? 和 ! 一场空欢喜 不要悲伤,我亲爱的好姑娘 更新证书错误:No matching provisioning profiles found CABasicAnimation的基本使用方法(移动·旋转·放大·缩小) ASP.NET中解决跨子域的Session共享 iPhone4S出现应用无法打开时的解决方案 [转] XCode 4.2 新功能 - Storyboard [摘] Objective-C的self.用法的一些总结 C# winform 与 flash as 的交互通讯 【转】DD_belatedPNG,解决IE6不支持PNG绝佳方案 IE6中margin值双倍的解决方案 [转] 弹性+固宽布局 Windows2003下配置PHP环境 去除Visual Studio .NET工程同SourceSafe的关联 遭遇价格欺诈 塑料瓶底的标志的含义!
IE6中正确显示png图片
布瓜去旅行 · 2011-08-22 · via 博客园 - 布瓜去旅行

在ie6中,png图片总是显示一个灰背景,很丑,从网上查了下解决办法如下,原文已经打不开了,所以就不注原文地址了,需要准备一个文件名为blank.gif的透明图片:

function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6. 

    
var arVersion = navigator.appVersion.split("MSIE"); 
    
var version = parseFloat(arVersion[1]); 
    
if ((version >= 5.5 && version < 7.0&& (document.body.filters)) 
    { 
       
for(var j=0; j<document.images.length; j++
       { 
          
var img = document.images[j]; 
          
var imgName = img.src.toUpperCase(); 
          
if (imgName.substring(imgName.length-3, imgName.length) == "PNG"
          { 
            
var width = img.width; 
   
var height = img.height; 
   
var sizingMethod = (img.className.toLowerCase().indexOf("scale">= 0)? "scale" : "image"
   img.runtimeStyle.filter 
= "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + img.src.replace('%23''%2523').replace("'""%27"+ "', sizingMethod='" + sizingMethod + "')"
   img.src
="images/blank.gif"
   mce_src
="images/blank.gif"
   img.width 
= width; 
   img.height 
= height;
          } 
       } 
    }     

window.attachEvent(
"onload", correctPNG);