jquery fading of PNG images under IE8 animation black background bug

Source: Internet
Author: User

Under IE7 and IE8 if you dynamically modify the transparency of a PNG image, for example, if you apply a fadein, and the transparency of the image is tuned to 25%, there will be a very strange bug,png transparent message! Turned out to be a very ugly black!

Solution Idea:

First type:

Add an outer layer to the picture and add the same outer background color or background image to the image. The advantage is that when you use jquery to change the overall background color, you can change the background color or the background picture simultaneously by calling the label

The second type:

Set an outer layer of the picture and change the transparency of the outer layer when switching animations. I have not tried this, do not know can not, in principle, is feasible.

The third type:

Change the format of the picture to png-8 (the color of the picture will be biased, not appropriate), JPG (this is actually similar to the first kind.) )

If you have a better plan, you might as well share it.

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.