property

mask-origin — CSS reference

Selects the positioning area of each layer. Initial border-box; not inherited. Content-box starts inside border and padding. SVG elements have additional reference boxes. This determines positioning rather than clipping.

Formal Syntax & Structure

css syntaxcss
<geometry-box>#

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-repeat:no-repeat;mask-size:20px 20px;mask-origin:content-box}</style><body><div id="a" aria-hidden="true"></div><p>Decorative shape example.</p></body></html>
CSS Reference