The best way to deal with the transparency of PNG background images in IE6

Source: Internet
Author: User

PNG (24-bit) image display is not transparent under IE6 browser.

1. The approach is to useDDPngMin.js

<!--[if IE 6]> 
<script src="js/DDPngMin.js"></script>
<script>
DD_belatedPNG.fix(‘.ad_img img,#banner_ctr ul‘);
</script>
<![endif]-->

The first approach is suitable for situations where the color of the background map cannot be represented, and can only be replaced with a picture. And both the background picture and the inserted picture are transparent.

2. Another option is to process PNG (24-bit) images into 8-bit images.

This approach is troublesome, and every picture may have to be dealt with. The picture is reduced, and the quality of the picture is lost.

3. Replace with 16 color values:

Filter:progid:DXImageTransform.Microsoft.gradient (startcolorstr= #22FFFFFF, endcolorstr= #22FFFFFF);

There is no compatibility problem with the third approach, and the use of color code, the client does not need to request pictures again, compared to save resources.

The best way to deal with the transparency of PNG background images in IE6

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.