clip-path

Creates a clipping region that sets what part of an element should be shown. Parts inside the region are visible, while those outside are hidden.

It is documented as part of the CSS Masking specification.

/* Usage Example */
.hero-shape {
  clip-path: polygon(0% 0%, 100% 0%, 100% 75%, 50% 100%, 0% 75%);
  /* creates a pointed banner/hero shape */
}

/* Syntax */
clip-path: none;

/* Global values */
clip-path: inherit;
clip-path: initial;
clip-path: revert;
clip-path: revert-layer;
clip-path: unset;

This comparison shows how clip-path works in a real project. View snippet →

Widely available Since 2021 96% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2021.

55+
3.5+
9.1+
79+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC