Home > Web Front-end > JS Tutorial > body text

Introduction to using the PNG transparent JS plug-in to solve IE6_javascript skills

WBOY
Release: 2016-05-16 17:36:28
Original
1215 people have browsed it

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:

Copy code The code is as follows:



<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:
Copy code The code is as follows:

DD_belatedPNG.fix( '#png');

Pseudo class example:
Copy code The code is as follows:

DD_belatedPNG.fix('.png a:hover,.png a:focus');

img tag example:
Copy code The code is as follows:

DD_belatedPNG.fix('img');

If there are multiple direct Just add a comma (in English). For example:
Copy code The code is as follows:

DD_belatedPNG.fix('.png_bg,#png ,.png a:hover,.png a:focus,img');

Usage:
Copy code The code is as follows:



The style selectors in brackets are separated by commas
JS file download address:
0.0.8a- min.js (compressed version)

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!