property
opacity — CSS reference
Controls the opacity of the element as a composited group, including descendants. Values outside zero to one are clamped. Unlike alpha in one color, opacity affects the whole group. An opacity below one establishes a stacking context; zero does not remove layout, focusability or hit testing. Avoid using opacity alone to hide interactive content.
Formal Syntax & Structure
css syntaxcss
<number> | <percentage>Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS accessible theme lab</title><style>body {margin:0} .sample {height:12px;background:#006050}#a{opacity:50%;background:#ddd} #b{opacity:2} #c{opacity:0;width:100px;height:20px}</style><body><div id="a"><span id="child">Child</span></div><div id="b">Opaque</div><button id="c">Invisible but present</button></body></html>