Resolution IE6 PNG transparent JS plugin dd_belatedpng
Citation: http://www.cnblogs.com/cobby/archive/2012/05/11/2495801.html
IE6 png transparency is an old problem, recently a friend asked me if I have the best solution to this problem plug-in. Although know and in use dd_belatedpng this plug-in, today take time to send this up.
Although I previously posted a jquery png plugin in my blog, it does not support background tiling.
Dd_belatedpng uses the Microsoft VML language to redraw PNG images to achieve translucency, and supports background-position and Background-repeat attributes, supporting pseudo-classes. is a good recommended plug-in, the usage is relatively simple.
How to use:
123456 |
<!--[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:
1 |
Dd_belatedpng.fix (' #png '); |
Pseudo-Class Examples:
1 |
Dd_belatedpng.fix ('. png a:hover,.png a:focus '); |
IMG Tag Examples:
1 |
Dd_belatedpng.fix (' img '); |
If there are multiple direct commas (in English), the line. For example:
1 |
Dd_belatedpng.fix ('. PNG_BG, #png,. png a:hover,.png a:focus,img '); |
The png24 problem of IE6