Clip
Clip CSS properties define a clipping path that determines the visible portion of an element.
Clip Properties
clip-path
Defines the shape that determines which part of an element should be visible.
none
— no clipping pathurl(...)
— e.g.url(resources.svg#id)
; referencing an SVG<clipPath id="...">
element (see<clipPath>
example here)- a geometry box — use the specified box, including corner shaping via
border-radius
, to be the clipping path; specify any of:margin-box
,border-box
,padding-box
,content-box
,fill-box
,stroke-box
,view-box
- a basic shape — see basic shape data type, e.g.
circle(...)
,ellipse(...)
,polygon(...)
| LIVE PREVIEW

clip
Deprecated, use the newer
clip-path
property instead.Defines a visible portion of an element. Only applies to absolutely positioned elements
(i.e., those with position: absolute
or position: fixed
.)
Specify:
auto
— no clipping (default)rect(top, right, bottom, left)
— e.g.rect(0, 175px, 113px, 0)
(as offsets from the top/left border); defines the rectangle for the clipping
div {
clip: rect(1px, 10em, 3rem, 2ch);
}
Assets
- Andrew Ridley (Unsplash) — https://unsplash.com/photos/jR4Zf-riEjI
References
- clip-path (MDN) — https://developer.mozilla.org/en-US/docs/Web/CSS/clip-path
- clip (MDN) — https://developer.mozilla.org/en-US/docs/Web/CSS/clip