DD_belatedPNG.js solves the problem of gray background of transparent PNG images (download DD_belatedPNG.js)

Source: Internet
Author: User
First, if you want to implement a transparent background image, it can be a png image or a gif image. However, when you use a gif image, there will be a significant sawtooth effect, in IE6, the background of a transparent PNG image changes to gray (# DBEAED), which can only blame the poor rendering of IE engine.

First, if you want to implement a transparent background image, it can be a png image or a gif image. However, when you use a gif image, there will be a significant sawtooth effect, in IE6, the background of a transparent PNG image changes to gray (# DBEAED). This can only be blamed for poor IE engine rendering. There are many solutions. CSS Filter has tried several times and the effect is poor, still usedDD_belatedPNG.jsConvenience. Many large websites also solve this problem. I personally think it is also the best solution.

 

It is easy to use. The code above indicates loading the DD_belatedPNG.js file under IE6, and repairing the background opacity effect with the img image of class = ". png_bg.
Note that:
1. You can fix the img images of multiple selectors: DD_belatedPNG.fix ('. example1,. example2, img ');
2. If transparent PNG is used as the background image of a: hover, the "a: hover" is used as the selector: DD_belatedPNG.fix('.png a: hover ');
You can click dd_belatedpng.zip to download it. For more detailed tutorial, please refer to the official website (http://www.dillerdesign.com/experiment/DD_belatedPNG)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.