property
mask-position — CSS reference
Positions each mask image relative to its positioning area. Initial 0% 0%; not inherited. Percentages align corresponding points in the image and area. A smaller nonrepeating mask reveals only the selected portion.
Formal Syntax & Structure
css syntaxcss
<position>#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{mask-image:linear-gradient(black,black);mask-size:40px 60px;mask-repeat:no-repeat;mask-position:right center}</style><body><div id="a" aria-hidden="true"></div><p>Decorative shape example.</p></body></html>