views:

67

answers:

1

I am trying to use AlphaImageLoader for a PNG image but my image is a sprite image. I am not getting the output of my sprite image when I use AlphaImageLoader in CSS. How can I use AlphaImageLoader for sprites? Can I use it for sprites?

+1  A: 

The DD_belatedPNG script allows for background-position, using VML instead of AlphaImageLoader.

This is a Javascript library that sandwiches PNG image support into IE6 without much fuss.

You can use PNGs as the SRC of an <IMG/> element or as a background-image property in CSS.

If you attempt the latter, you will find that, unlike with vanilla usage of AlphaImageLoader, background-position and background-repeat work as intended.

As a bonus, "fixed" elements will respond to a commonly used set of Javascript style assignments, as well as the a:hover pseudo-class.

Yi Jiang
but I want to applyy this for sprite image how can I do that
Vipul
but I want to applyy this for sprite image how can I do that
Vipul
@Vipul Look at the Usage section of the webpage: http://www.dillerdesign.com/experiment/DD_belatedPNG/#usage You need to include the Javascript file, then call the `DD_belatedPNG.fix()` function with a CSS selector that selects the elements you need to fix PNG transparency for.
Yi Jiang