IE 5.5和IE6 PNG透明修复程序(需要原型)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了IE 5.5和IE6 PNG透明修复程序(需要原型)相关的知识,希望对你有一定的参考价值。
// this will iterate with each element with the class 'ie-fix-opacity' and add an IE filter, // replacing the background-image for the filter of that image var version = parseFloat(navigator.appVersion.split('MSIE')[1]); if ((version >= 5.5) && (version < 7) && (document.body.filters)) { document.getElementsByClassName('ie-fix-opacity').each(function(poElement){ // if IE5.5+ on win32, then display PNGs with AlphaImageLoader var cBGImg = poElement.currentStyle.backgroundImage; var cImage = cBGImg.substring(cBGImg.indexOf('"') + 1, cBGImg.lastIndexOf('"')); poElement.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + cImage + "', sizingMethod='scale')"; poElement.style.backgroundImage = "none"; }); }
以上是关于IE 5.5和IE6 PNG透明修复程序(需要原型)的主要内容,如果未能解决你的问题,请参考以下文章