木小乐

最佳IE6环境下实现PNG-24的应用方案

运用JS实现IE6下的PNG透明效果
相关JS地址:
http://www.14pc.com/demo/ie6png.js
方法:
在使用PNG的页面中引用代码
<!–[if IE 6]>
<script type=”text/javascript” src=”下载下来的JS路径”></script>
<script>
DD_belatedPNG.fix(’CSS选择器, 应用类型’);
</script>
<![endif]–>

引用函数是 DD_belatedPNG.fix() , 括号里分别填写应用PNG的CSS选择器(可使用ID选择器和类选择器)和应用类型(分为img和background两种)。
如DD_belatedPNG.fix(’#box-one, img’) 或者 DD_belatedPNG.fix(’.header, background’) 等。
这些可以简写成 DD_belatedPNG.fix(’#box-one, .header, img,background’); 。
更多选择器的如 DD_belatedPNG.fix(’#box-one, .header,#footer,.box-two a:hover, img,background’); 等等。
http://www.osmn00.com/?p=419


posted on 2009-10-07 12:57  stri  阅读(120)  评论(0)    收藏  举报

导航