Mywebdunia's Blog

Posts Tagged ‘css alpha

If you want to set transparency for images or text, it could be done easily using CSS class attribute. Below example sets 50% transparency.

Example:
.transparentClass{
filter:alpha(opacity=50); // for IE5-7
-moz-opacity:0.5; // Netscape Navigator.
opacity:0.5; // for all other browsers
-ms-filter:”progid:DXImageTransform.Microsoft.Alpha(Opacity=50)”; // for IE5-8
}
The following code can be used to set transparency. the four
seperate CSS Statements are used for different browsers.


Categories