CHANGE AN ELEMENT’S OPACITY

You can set an element’s visual opacity, also known as transparency in CSS3, using the opacity property. When set, the selected element will become translucent, according to the nonnegative real number value between 0 and 1. In other words, a value of 0 is completely transparent, 1 is completely visible, and any decimal number in between will achieve a see-through effect.

Older versions of Internet Explorer, versions 4 to 8 to be precise, support a similar feature through an alpha filter. Its value is a two-digit percentage, so if you set opacity to 0.75, you should also set filter to alpha(opacity=75). Note that Internet Explorer 9 does understand the new opacity property:

selector { opacity: value; filter: alpha(opacity=value); ...

Get HTML5: Your visual blueprint™ for designing rich web pages and applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.