IE6 does not support transparent PNG images with gray background. ie6 does not support png background.

Source: Internet
Author: User

IE6 does not support transparent PNG images with gray background. ie6 does not support png background.

Solution:

1. Filter

The special filter effect in IE browser, and the png file must be used as the background image.

Filter: progid: DXImageTransform. Microsoft. AlphaImageLoader (enabled = true, src = string, sizingMethod) Whether to enable the Filter effect. How to display the background image

Image: Zoom In or out the box to display the entire background Image.

Crop: Crop an image to fit the object size.

Scale: Scale the image to fit the object size.

# Box {// for IE

Width: 152px;

Height: 152px;

Filter: progid: DXImageTransform. Microsoft. AlphaImageLoader (src = "PNG image URL", sizingMethod = image)

}

Html> body # box {// for non-IE

Background: url (images/circle.png );

}

1. JS + transparent gif

Reference external JS files (only for images in png files, invalid for background)

<Script type = "text/javascript" src = ""> </script>

2. DD_belatedPNG

The first two do not support background-position and background-repeat.

<! -- [If IE6]>

<Script type = "text/javascript" src = "javascript/DD_belatedPNG_0.0.8a-min.js">

</Script>

<Script>

DD_belatedPNG.fix ('css selector, application type ');

</Script>

<! -- [Endif] -->

For example, fix ('# box, img'), fix ('# box, background ').

When solution 1 is used to add a link to a background image, the link cannot be triggered in non-blank areas of the background image in ie6. solution: add the position: relative; attribute to the link.

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.