CSS Opacity and Transparency

The Web Book

Products


CSS Opacity and Transparency Example Code

HTML CODE .......................................... <!DOCTYPE html> <html> <body> <h3>Products</h3> <img class="images" src="product1.jpg"> <img class="images" src="product2.jpg"> </body> </html> CSS CODE ............................................................. .images {float:left; width:100px; height:140px; margin:5px;} img {opacity:0.5;filter:alpha(opacity=40); } img:hover {opacity:1.0;filter:alpha(opacity=100);} Back