ie6里png图片不透明

ie6下img图片或背景图片为png时,图片变成了一片黑色:

ie6里png图片不透明

图中的jquery-timepicker的两个黑方块和img就是由此原因引用的。解决方法:由Drew Diller提供,对img、background-image、background-position均支持。

<!--[if IE 6]>

<script type='text/javascript' src='DD_belatedPNG_0.0.8a-min.js'></script>

<script>

DD_belatedPNG.fix('.ui-icon,img,.divWithPng');/可同时应用于多个选择器

</script>

<![endif]-->

用法:引入DD_belatedPNG_0.0.8a-min.js(下载地址http://www.dillerdesign.com/experiment/DD_belatedPNG/)后,

DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement

你可能感兴趣的:(ie6)