Dd_belatedpng, Solution IE6 does not support PNG-24 excellent solution

Source: Internet
Author: User

PNG24 supports transparency under IE. Finally find the following possible solutions:

We know that IE6 does not support transparent PNG-24 , which undoubtedly limits the use of web design space.

However, the solution to this IE6 transparent PNG-24 across the internet is numerous, from using IE-specific filters or using transparent GIFs instead. But these methods have one drawback, that is, the CSS is not supported backgrond-position and background-repeat .

And I introduce dd_belatedpng today, only need a reason, is that it supports backgrond-position and background-repeat, which is not available in other JS plugins. At the same time dd_ Belatedpng also supports a:hover pseudo-class properties, as well as IMG tags. For more detailed information about dd_belatedpng , please read the official documentation:http://www.dillerdesign.com/experiment/DD_belatedPNG/ Translation is not available here. Because I am a rookie in English and not a leading authority, hehe.

Next I will introduce its use method, in fact, the method is very simple to see the following steps:

1. First download call the JS plugin (dd_belatedpng) as follows:

0.0.8a.js (official uncompressed version, ~12kb)0.0.8a-min.js (Official Compressed edition, ~7KB)

2. Then use the head tag in the PNG-24 image page to refer to the following code:

<!--[if IE 6]><script src=]. /js/dd_belatedpng.js "type=" Text/javascript "></script><script type=" Text/javascript ">dd_ Belatedpng.fix (' * ');</script><![ endif]-->  

The reference function is dd_belatedpng.fix () , which fills in parentheses with the CSS selector (which can use the ID selector and class selector) and the application type (both the IMG tag and the background attribute), respectively, in the application PNG-24.

Such as

<type="Text/javascript" >dd_belatedpng.fix (' #box, img ');  </script>     

Or

<type="Text/javascript" >dd_belatedpng.fix ('. Header, background ');  </script>     

And so on, these can be simply written

<type="Text/javascript" >dd_belatedpng.fix (' #box-one,. Header, IMG, background ');  </script>     

Using the * sign directly or as in this example means that all CSS selectors and XHTML tags are applied.

<type="Text/javascript" >dd_belatedpng.fix (' * ');  </script>     

Okay, about the dd_belatedpng JS plug-in introduction and use so much, look forward to sharing more application methods!

Dd_belatedpng, Solution IE6 does not support PNG-24 excellent solution

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.