CSS Property: clip
Cuts the sides off a box, determining an area that is visible.
Applies to absolutely positioned boxes.
Possible Values
| Value | Description | Example |
|---|---|---|
rect([top], [right], [bottom], [left]) | A rectangular shape, with [top], [right], [bottom], and [left] being lengths (or auto) specifying how far inwards from the edge the clipping region should be. | rect(10px, 50px, 30px, 10px) |
auto | No clipping. Default. | |
inherit | ||
initial | ||
unset | ||
Example
figure {
position: absolute;
clip: rect(10px, 50px, 30px, 10px);
}
