Home > Web Front-end > JS Tutorial > DD_belatedPNG, PNG transparent solution under IE6 (foreign)_javascript skills

DD_belatedPNG, PNG transparent solution under IE6 (foreign)_javascript skills

WBOY
Release: 2016-05-16 18:14:38
Original
1082 people have browsed it

We know that IE6 does not support transparent PNG, which undoubtedly limits the space for web design.
However, there are countless solutions to the transparent PNG of IE6 on the entire Internet, ranging from using IE-specific filters or expression, and then to javascript to replace transparent GIF. However, these methods have a shortcoming, that is, they do not support backgrond-position and background-repeat in CSS.

Today I introduce DD_belatedPNG for only one reason, that is, it supports backgrond-position and background-repeat. This is not available in other js plug-ins. At the same time, DD_belatedPNG also supports a:hover attribute, and .

See Demo

Principle
This js plug-in uses Microsoft's VML language for drawing, while most other js plug-ins that solve PNG problems use the AlphaImageLoader filter.

How to use
1. Download here DD_belatedPNG.js file.
2. Quote in the web page, as follows:

Copy code The code is as follows:



3. There are two kinds of calling functions, one is DD_belatedPNG.fix(), as shown in the code above. The other is fix(), this method requires pointing out the css selector name in the function.

Use a: Please pay attention to hover
5-25 update: If you want to use a transparent PNG as the background image for a:hover like Jutoy, then you need to pay attention to your code and select "a:hover" Otherwise, it may lead to failure. At the same time, I have also updated the demo, please update if necessary. Then let’s take a look at the correct code:
Copy code The code is as follows:



Other solutions
Other solutions are provided here for your reference.
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