The PNG transparency of IE6 is an old problem. Recently, a friend asked me if I had the best plug-in to solve this problem. Although we know that we are using the DD_belatedPNG plug-in, we will release it today.
Although I have posted a jquery png plug-in my blog, it does not support Background tile.
DD_belatedPNG uses Microsoft's VML language to redraw PNG images to achieve translucent effects. It also supports background-position and background-repeat attributes and supports pseudo classes. Is a good plug-in worthy of recommendation, and its usage is relatively simple.
Usage:Copy codeThe Code is 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 (). Change. png_bg in brackets to your css selector name.
ID selector example:Copy codeThe Code is as follows: DD_belatedPNG.fix ('# png ');
Pseudo-Class Example:Copy codeThe Code is as follows: DD_belatedPNG.fix('.png a: hover,.png a: Focal ');
Img Tag example:Copy codeThe Code is as follows: DD_belatedPNG.fix ('img ');
You can simply add multiple commas. For example:Copy codeThe Code is as follows: DD_belatedPNG.fix('.png_bg,#png,.png a: hover,.png a: focus, img ');
Usage:Copy codeThe Code is 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 style selector is enclosed in brackets, separated by commas (,).
JS file:
0.0.8a-min. js (compressed version)