IE6 's PNG transparency is an old problem, and recently a friend asked me if I had the best plugin to solve the problem. Although know and use dd_belatedpng this plug-in, today take time to send this up.
Although a jquery PNG plugin was previously posted on the blog, it does not support background tiling.
Dd_belatedpng uses the Microsoft VML language to repaint PNG images to achieve translucent effects, and supports Background-position and Background-repeat properties to support pseudo classes. is a good recommended plug-ins, the use is relatively simple.
How to use:
Copy Code code as follows:
<!--[if IE 6]>
<script src= "Dd_belatedpng.js" ></script>
<script>
Dd_belatedpng.fix ('. Png_bg ');
</script>
<! [endif]-->
The reference function is Dd_belatedpng.fix (), and the. PNG_BG in parentheses is changed to your CSS selector name.
ID Selector Example:
Copy Code code as follows:
Dd_belatedpng.fix (' #png ');
Pseudo Class Example:
Copy Code code as follows:
Dd_belatedpng.fix ('. png a:hover,.png a:focus ');
IMG Tag Example:
Copy Code code as follows:
Dd_belatedpng.fix (' img ');
If more than one direct comma (in English) on the line. For example:
Copy Code code as follows:
Dd_belatedpng.fix ('. PNG_BG, #png,. png a:hover,.png a:focus,img ');
How to use:
Copy Code code as follows:
<!--[if IE 6]>
<script type= "Text/javascript" src= "Js/dd_png.js" ></script>
<script type= "Text/javascript" >
Dd_belatedpng.fix ('. tel,.head_content ');
</script>
<! [endif]-->
The bracket is a style selector, separated by commas in the middle.
JS File Download Address:
0.0.8a-min.js (compressed version)