PNG transparency in IE6 is an old problem. Recently, a friend asked me if I have the best plug-in to solve this problem. Although I know and use the DD_belatedPNG plug-in, I took the time to post this today.
Although I have posted a jquery png plug-in in my blog before, it does not support background tiling.
DD_belatedPNG uses Microsoft's VML language to redraw PNG images to achieve a translucent effect, and can support background-position and background-repeat attributes and pseudo-classes. It is a good plug-in that is worth recommending and is relatively simple to use.
Usage:
<script> <br>DD_belatedPNG.fix('.png_bg'); <br></script>
The referenced function is DD_belatedPNG.fix(), and the .png_bg in the brackets should be changed to your css selector name.
ID selector example:
DD_belatedPNG.fix( '#png');
Pseudo class example:
DD_belatedPNG.fix('.png a:hover,.png a:focus');
img tag example:
DD_belatedPNG.fix('img');
If there are multiple direct Just add a comma (in English). For example:
DD_belatedPNG.fix('.png_bg,#png ,.png a:hover,.png a:focus,img');
Usage:
The style selectors in brackets are separated by commas
JS file download address:
0.0.8a- min.js (compressed version)