CSS clip Property

The clip property specify at defining what portion of an absolutely positioned element you want to make visible. Except for the specified region, all are hidden.

What happens if an image is larger than its containing element?

The clip property lets you specify a rectangle to clip an absolutely positioned element. The rectangle is specified as four coordinates, all from the top-left corner of the element to be clipped.

Note: CSS clip property won’t work for “overflow: visible”.

CSS Syntax

clip: auto|shape|initial|inherit;

Example -