|
OverviewPng-24 (alpha transparency) image support for Microsoft Internet Explorer versions 6 and 5.5 - Supports the box model ( padding, border, width/height and margin )
- Integrates with third-party selector engines and/or standard dom methods for more precise image conversion
- Does not require placeholder images
- Works for inline images only *
* Transparent png background image support cannot be reliably supported in Internet Explorer 6 or 5.5 UsageIn the simplest case you can just add the script to your page and it will convert all inline png images on the window.onload event. <!--[if lte IE 6]>
<script src="http://png-6.googlecode.com/svn/build/png-6.v1(r1).js"></script>
<![endif]--> However, it is recommended that you use more specific selection criteria or the script will convert all png images including 8-bit pngs. If you have a selector engine available from an already loaded library this can be used, otherwise, you can pass in any array of elements that you want to be converted: <!--[if lte IE 6]>
<script src="http://png-6.googlecode.com/svn/build/png-6.v1(r1).js"></script>
<script>
// Use jQuery selector engine since it's available (any selector engine will do)
Png6.setSelectorEngine( jQuery );
// Convert images when the dom is ready
$(function () {
Png6.convert( 'img.png24' );
});
</script>
<![endif]-->Using the convert method you can also apply the png-6 conversion to dynamically updated content. Calling the convert method cancels the default window.onload handler and requires images to be available on the page to have any effect; a 'domReady' type event handler is generally the best option from a performance viewpoint.
|