CSS - RGBA

> (World Wide) Web - (W3|WWW) > CSS - Cascading Style Sheets - Markup Language (HTML|XML) Skin

1 - About

CSS - RGB Color Definition with an opacity parameter. New in css3.

Advertising

3 - Example

div { 
    width: 50px;
    height: 50px;
    float: left;
    margin-bottom: 10px;
}
Palette of Red with Alpha:
<p style="clear:both"></p>
<div style="background: rgba(255, 0, 0, 0.2);"></div>
<div style="background: rgba(255, 0, 0, 0.4);"></div>
<div style="background: rgba(255, 0, 0, 0.6);"></div>
<div style="background: rgba(255, 0, 0, 0.8);"></div>
<div style="background: rgba(255, 0, 0, 1) ;"></div>
<p style="clear:both"></p>
Palette of Red without Alpha:
<p style="clear:both"></p>
<div style="background: rgb(243, 191, 189);"></div>
<div style="background: rgb(246, 143, 142);"></div>
<div style="background: rgb(249, 95 , 94) ;"></div>
<div style="background: rgb(252, 47, 47) ;"></div>
<div style="background: rgb(255, 0, 0) ;"></div>

4 - Documentation / Reference

web/css/rgba.txt ยท Last modified: 2019/02/09 11:40 by gerardnico