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 abackground-image
property in CSS.If you attempt the latter, you will find that, unlike with vanilla usage of
AlphaImageLoader
,background-position
andbackground-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
2010-09-06 15:25:28
but I want to applyy this for sprite image how can I do that
Vipul
2010-09-07 06:15:26
but I want to applyy this for sprite image how can I do that
Vipul
2010-09-07 06:17:12
@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
2010-09-07 06:51:24