CSS clip-path Property
Description
The clip-path CSS property allows you to control which parts of an element are visible by defining a clipping region. Anything that falls outside this region is visually hidden, while the content inside remains visible and interactive. Unlike traditional cropping, clip-path does not permanently remove content - it simply masks it at render time. This makes it extremely useful for creating non-rectangular layouts, decorative effects, and modern UI designs without modifying the underlying HTML structure or using images.
One of the most powerful aspects of clip-path is its ability to create complex shapes using geometric definitions such as polygons, circles, or ellipses. This allows designers to move beyond standard rectangles and introduce visually engaging layouts like diagonal sections, angled cards, speech bubbles, or custom hero sections. Because clipping is handled at the CSS level, these shapes scale naturally with responsive layouts and can adapt smoothly to different screen sizes, making them ideal for modern, fluid design systems.
Another key benefit of clip-path is how well it integrates with transitions and animations. You can animate between different clipping shapes to create engaging hover effects, reveals, or dynamic transitions between UI states. This is commonly used for interactive buttons, image reveals, and animated navigation elements. Since the clipped content still exists in the DOM, it remains accessible to screen readers and search engines, helping maintain semantic structure while achieving advanced visual effects. Overall, clip-path provides a powerful balance between creative freedom and performance-friendly design when used thoughtfully.
Definition
- Initial value
- none
- Applies to
- All elements
- Inherited
- No
- Computed value
- As specified, but with <url> values made absolute
- Animatable
- Yes
- JavaScript syntax
- object.style.clipPath
Interactive Demo

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
Values
- <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.
Example
Browser Support
The following information will show you the current browser support for the CSS clip-path property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
