Transparent Background

Description

background:rgba allows us to modify the transparency of backgrounds.

Code Example

div{background:rgba(0,255,0,0.2);}
div div{background:inherit;}

rgba format adds an alpha channel to the red, green, and blue channels. Values from 0 (transparent) to 1 (opaque).

Result

background:rgba

Browser Support

Browser Comment
Firefox Yes
Safari Yes
Chrome Yes
Opera No
IE <= 8 No (see Notes)
IE 9 Yes?

Notes

  • A filter property is available for IE: filter:alpha(opacity =75);
Title

details

Thanks for visiting!