transparent images using css with opacity

2006 Dec 6

Using CSS we could add some uniqueness to our hml pages using transparent images. for example, if we have a global background image ang on top of it there is a gif image only the border or the edges would become transparent.

Specifiying the image opacity allows us to adjust the transparency of our images. here's a sample code. i usually place it under #container tag on my css file.

/* CSS file */
body{
background-image: url(images/background.gif);
}

#container{
filter:alpha (opacity=80); /* MS Internet Explorer */
filter:progid:DXImageTransform.Microsoft.Alpha (style=0, opacity=80) /* MS IE proprietory */
-moz-opacity: 0.8; /* Mozilla v1.6 and below */
opacity: 0.8; /* CSS-3 Standards */
-khtml-opacity:.8 /* Safari */
}
/* CSS file */

the code above makes all the image found on the #container tag lessen its opacity by 80%. not really usefull for me but, you might like it so here goes.

Tweet this post

Leave a comment


About Me


Alfredo Sanchez is an internet professional focusing on the study search engines behavior in particular. Supports Free Open Source Software and currently develops applications with it using XAMPP.

Recent Entries

Close