property
clip — CSS reference
Legacy clipping property for absolutely positioned boxes (including fixed positioning). Initial auto; not inherited. Right and bottom are coordinates from the top-left border edge, not inset distances. Prefer clip-path for new work.
Formal Syntax & Structure
css syntaxcss
auto | rect(<top>, <right>, <bottom>, <left>)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{position:absolute;top:0;left:0;clip:rect(0px,40px,60px,0px)}</style><body><div id="a" aria-hidden="true"></div></body></html>