keyword
transparent — CSS reference
The transparent keyword denotes transparent black, not an instruction to inherit or remove layout. It remains a color value. When interpolated with an opaque color, alpha-aware interpolation avoids introducing an unwanted dark tint. A transparent foreground can make text invisible; use it deliberately.
Formal Syntax & Structure
css syntaxcss
transparentWorking Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS color lab</title><style>body {margin:0} .sample {height:12px;background:#006050}p {padding:12px;background:white;color:black;border:2px solid currentColor} #a{color:transparent} #b{color:rgb(0 0 0 / 0)}
</style><body><p id="a">First color sample</p><p id="b">Second color sample</p></body></html>