concept
compositing — CSS reference
Combines painted source and backdrop contributions into an output image. In ordinary source-over compositing an opaque source replaces the backdrop; a transparent source contributes nothing. Group opacity applies after the group contents are rendered, so overlapping descendants behave differently from independently transparent children. Blending determines the color interaction before compositing.
Formal Syntax & Structure
css syntaxcss
Concept: source-over alpha compositingWorking Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS visual effects lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}body{background:white} #a{position:relative; margin:20px;width:80px;height:60px;background:rgb(255,0,0);box-sizing:content-box} #a{background:rgba(255,0,0,0.5)}</style><body><div id="a" aria-hidden="true"></div><p>Decorative effect example.</p></body></html>