CSS Clip

This CSS property specifies the visible area of an element. It applies to absolutely positioned elements (position: absolute;). It is generally used when the image is larger than its containing element.

It allows us to define a rectangle, which is specified as four coordinates for clipping an absolutely positioned element.

Syntax

Possible values

auto: It is the default value that shows the element as it is. There will be no clipping.

Example

Test it Now

shape: It is used to clip an element. It clips the defined area of the element. Its valid value is rect(top, right, bottom, left).

Example

Test it Now

Next TopicCSS clip-path




Latest Courses