DD_belatedPNG解决IE6下PNG不透明问题

使用方法:

首先下载JS文件:http://dillerdesign.com/experiment/DD_belatedPNG/

之后在页面中引用代码:

<!--[if IE 6]>
<script src="DD_belatedPNG.js"></script>
<script>
  /* EXAMPLE */
  DD_belatedPNG.fix('.png_bg');
  
  /* string argument can be any CSS selector */
  /* .png_bg example is unnecessary */
  /* change it to what suits you! */
</script>
<![endif]-->

引用函数是 DD_belatedPNG.fix() , 括号里分别填写应用PNG的CSS选择器(可使用ID选择器和类选择器)和应用类型(分为img和background两种)。

  1. 如DD_belatedPNG.fix(‘#box-one, img’) 或者 DD_belatedPNG.fix(‘.header, background’) 等。
  2. 这些可以简写成 DD_belatedPNG.fix(‘#box-one, .header, img,background’);
  3. 更多选择器的如 DD_belatedPNG.fix(‘#box-one, .header,#footer,.box-two a:hover, img,background’);

posted on 2014-06-20 16:23  荣锋亮  阅读(208)  评论(0编辑  收藏  举报

导航