1,解决直接以 img 标签显示的png图片** $(document.body).fixpng({scope:’img’}); ** 可将body内的所有png图片显示为透明效果.2,解决以 透明png为背景 图片的情况** $(‘div’).fixpng(); ** 可将所有 div 标签 背景图为png的变为透明
代码使用:全局
<script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/fixpng.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("body").fixPng(); }); </script>
部分:
CODE:
$("body").fixPng( "images/null.gif", "class", "nofixpng" ); <img src="img/imagem.png" class="test nofixpng" />