PNG opacity issues under IE6

Source: Internet
Author: User

A few days ago just finished a small demand, but in the compatibility of IE with a relatively long time, the main aspect is that the background is used in PNG format, and after looking to know, IE6 png picture transparent part rendering effect is not transparent, I see is a faint green, simple treatment is to use filters:

First write the element background in a compatible way to none:

_background:none;_filter: "Progid:DXImageTransform.Microsoft.AlphaImageLoader (src= ' images/w3cfunslogo.png ')";

Of course it works for a background map, but what about a page with multiple?

And, if it is an IMG tag picture, how to deal with PNG transparent part opacity problem?

Project, I used a plugin: dd_belatedpng_0.0.8a.js

It's used:

<!-- [If IE 6]>    <script type= "Text/javascript" src= "http://icon.zol-img.com.cn/news/js/DD_belatedPNG_ 0.0.8a.js "></script>    <script type=" Text/javascript ">          dd_belatedpng.fix ('. Js-data-wrap, IMG ');          Dd_belatedpng.fix (' #prevBtn, background ');    </script>    <![ ENDIF] -

Selector, the parent element of the IMG tag is selected.

It is important to note that background uses a filter to process PNG images, as if the opacity is not set.

PNG opacity issues under 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.