欢迎来到天天文库
浏览记录
ID:13026058
大小:63.50 KB
页数:0页
时间:2018-07-20
《ie6解决png格式灰边问题》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、·ie6对png透明图片灰边的处理方法·来源:网络 标签:ie6png透明图片·/*使用方法*/·/*·*·*·*·*·**//*以下为DD_belatedPNG_0.0.8a.js*
2、//***DD_belatedPNG:AddsIE6support:PNGimagesforCSSbackground-imageandHTML.*Author:DrewDiller*Email:drew.diller@gmail.com*URL:http://www.dillerdesign.com/experiment/DD_belatedPNG/*Version:0.0.8a*LicensedundertheMITLicense:http://dillerdesign.com/experiment/DD_belated
3、PNG/#license**Exampleusage:*DD_belatedPNG.fix('.png_bg');//argumentisaCSSselector*DD_belatedPNG.fixPng(someNode);//argumentisanHTMLDomElement**//*PLEASEREAD:AbsolutelyeverythinginthisscriptisSILLY.Iknowthis.IE'srenderingofcertainpixelsdoesn'tmakesense,soneitherdoesthisco
4、de!*/varDD_belatedPNG={ns:'DD_belatedPNG',imgSize:{},delay:10,nodesFixed:0,createVmlNameSpace:function(){/*enableVML*/if(document.namespaces&&!document.namespaces[this.ns]){document.namespaces.add(this.ns,'urn:schemas-microsoft-com:vml');}},createVmlStyleSheet:function()
5、{/*styleVML,enablebehaviors*//*Justincaselotsofotherdevelopershaveaddedlotsofotherstylesheetsusingdocument.createStyleSheetandhitthe31-limitmark,let'snotusethatmethod!furtherreading:http://msdn.microsoft.com/en-us/library/ms531194(VS.85).aspx*/varscreenStyleSheet,printSt
6、yleSheet;screenStyleSheet=document.createElement('style');screenStyleSheet.setAttribute('media','screen');document.documentElement.firstChild.insertBefore(screenStyleSheet,document.documentElement.firstChild.firstChild);if(screenStyleSheet.styleSheet){screenStyleSheet=sc
7、reenStyleSheet.styleSheet;screenStyleSheet.addRule(this.ns+'\:*','{behavior:url(#default#VML)}');screenStyleSheet.addRule(this.ns+'\:shape','position:absolute;');screenStyleSheet.addRule('img.'+this.ns+'_sizeFinder','behavior:none;border:none;position:absolute;z-index:
8、-1;top:-10000px;visibility:hidden;');/*largenegativetopvalueforavoidingverticalscrollbarsforlargeimages
此文档下载收益归作者所有