CSS clip-path Property


The clip-path property creates a limited area that determines which part of the element should be visible. Those parts that are inside the area are visible, while parts outside the area are hidden. A cropped area is a path defined either as an internal link, or as an external SVG, or as a shape, such as a circle ( circle() ).
The clip-path property has replaced the deprecated clip property.

Need some help with the clip-path property? If yes, then check out our online CSS Clip-Path Generator to see the clip-path property being used.

Initial value
Applies to
All elements
Computed value
As specified, but with <url> values made absolute
CSS Version
JavaScript syntax


clip-path: <clip-source> | [ <basic-shape> || <geometry-box> ] | none

/* where */
<clip-source> = <url> /* URL references an SVG <clipPath> element  */

/* and */
<geometry-box> = <shape-box> | fill-box | stroke-box | view-box


  • <clip-source>A <url> referencing an SVG <clipPath> element.
  • <basic-shape>The size and position of the area is determined by the value of . If geometry is not defined, the border-box will be used as a block.
  • <geometry-box>If defined in combination with <basic-shape>, this value defines the block for the base area. If set independently, defines the boundaries of the block, including the formation of angles (such as border-radius ). Geometry can be determined using one of the following values:
    • fill-box - Uses the boundaries of the object as the base area.
    • stroke-box - Uses stroke bounding box as the base area.
    • view-box - Uses the nearest SVG viewport as a base unit. If the viewBox defined for the element creating the SVG viewport, the base unit is positioned in the original coordinate system set by the viewBox attribute and the width and height of the base unit are set to the values ​​of the viewBox attribute.
    • margin-box - Uses margin box as a base unit.
    • border-box - Uses a border box as a base unit.
    • padding-box - Uses a padding box as a base unit.
    • content-box - Uses the content box as the base unit.
  • noneCropped area is not created.


<div class="container">
<img src="images/sunset.jpg" alt="Sunset">
img {
   -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
   clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);

Browser Support

Explorer Edge Chrome Firefox Opera Safari
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung

Last updated by CSSPortal on: 14th December 2019