CSS clip-path Property
The clip-path property of CSS is used to clip the particular section of the image such that part of the image inside the section is shown and part of the image outside the section is not shown.
clip-path: <clip-source> | <basic-shape> | none;
Property value: All the properties are described well with the example below.
<basic-shapes>: It includes some shapes like circles, rectangles, ellipse, etc that clips the given image.
Example 1: This example displays the basic use of the clip-path property to insert the specific shapes that clip the given image.
clip-path: none;: It includes no clipping. This is the default value.
Example 2: This example displays the basic use of the clip-path property where the value is set to none.
clip-path: clip-source;: In this, the clipping part is taken from another HTML element that contains either image or element. Element id is used to refer to the element.
Example 3: This example displays the basic use of the clip-path property where the property value is set to a url.
- Firefox 3.5
- Edge 12.0 (only supports clip paths defined by url())
- Internet Explorer 10.0 (only supports clip paths defined by url())
- Opera 42.0
- Safari 9.1
- Chrome 55.0