Get my e-book focusing on CSS3 and
modern web UI development.
dig into web UI development
Last modified: 25. 2. 2016
This is an RGB color with a fourth parameter (a number) which is the alpha transparency channel.
rgba(_red_, _green_, _blue_, _transparency_);
opacity: 0.5 will make an element and all its children semi-transparent.
RGBa is a color that can be applied to any element without influencing the rest
of it (e.g. its children). In other words, you can use it for background color
background: rgba(20%, 100%, 20%, .5).
Take a look at cdpn.io/e/HrBsD.
All browsers except IE8 and older versions have no problem with rendering RGBa. However, by using a defined fallback, you can respectfully deal with “the elderly”.
color: rgb(128, 0, 0); color: rgba(255, 0, 0, 0.5);
This fallback will be rendered by modern browsers as a red color with a 50% transparency. IE8 will render it as a dark shade of red. A fallback color must be defined with respect to the background color, which is black in this case.
You can alternatively use CSS3Pie.