O'Reilly logo

HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition by Bruce Hyslop, Elizabeth Castro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting the Opacity of Elements

Using the opacity property, you can change the transparency of elements, including images (Image and Image).

Image This document contains a div element with an image enclosed.

...<body><div class="box">     <img src="sleeves.jpg" width="420" height="296" alt="Record Sleeves" /></div></body></html>

Image Here’s what our example looks like ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required