IE does not support transparent PNG images. What should I do?

Source: Internet
Author: User
Tags crop image scale image
IE does not support transparent PNG images. What should I do?
Solution :
IE directly does not support the transparent effect of images in PNG format, but this problem can be solved through the alphaimageloader filter.
Procedure :
Code Example:

<Body bgcolor = "# eeeeee">
PNG transparency:
<Div style = "filter: progid: dximagetransform.microsoft.alphaimageloader(src?demo.png); width: 200px; Height: 150px"> </div>
PNG opacity: <br>

Note: before using this code, make sure that the PNG Image has a transparent part.
Note
After the code is run, you can see that by setting the SRC Parameter of the alphaimageloader filter, you can achieve PNG transparency in IE, as shown in 2.3.3.

Figure 2.3.3 transparent PNG Image
Note

currently, most browsers do not fully support PNG. By using the alphaimageloader filter in the DXImageTransform. filter group, the display effect of PNG images in IE is improved. The alphaimageloader filter is used to display an image between the background and content in the container range. It can be used to cut or scale the image size, and can be 0 ~ 100% transparent PNG image. Two Parameters of the alphaimageloader filter are described as follows:
set the sizingmethod or obtain the display mode of the image of the object to which the filter applies within the boundary of the object container, optional values include crop (crop image for container size), image (make container size for image size, default value), and scale (scale image size for container size ).
SRC specifies the address of the background image.

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.