February 17, 2005

CSS - Transparency for Images

{img src="assets/misc/solar-radar.jpg" width="105" height="140"
alt="solar-radar (7K)"
style="-moz-opacity:0.5;
filter:alpha(opacity=50);cursor:hand" onmouseover="this.style.MozOpacity=1;
this.filters.alpha.opacity=100"
onmouseout="this.style.MozOpacity=0.5;
this.filters.alpha.opacity=50"}

In the above code:

-moz-opacity:0.5; - alters opacity in Mozilla based browsers
filter:alpha(opacity=50); - alters opacity in Internet Explorer

More details

No comments: