property
mask-clip — CSS reference
Limits the area affected by each layer. Initial border-box; not inherited. Can differ from mask-origin. For an SVG mask reference the mask element defines its clipping region instead. No-clip removes the geometry-box limit.
Formal Syntax & Structure
css syntaxcss
[ <geometry-box> | no-clip ]#Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS masking and shapes lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}body{background:white} #a{position:relative;margin:20px;width:80px;height:60px;background:red;box-sizing:content-box}#a{padding:10px;mask-image:linear-gradient(black,black);mask-clip:content-box}</style><body><div id="a" aria-hidden="true"></div><p>Decorative shape example.</p></body></html>