Loading...
.banner {
clip-path: path('M0 0 H600 V160 L0 200 Z');
}.banner {
clip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%);
clip-path: shape(from 0 0, line to 100% 0, line to 100% 80%, curve to 0 100% with 50% 100%, close);
}shape() accepts percentages, so the curve follows the element size, and the polygon() line is a fallback.
path() and getting a shape that doesn't scale with the element.shape() with percentages instead of a fixed-size path().polygon() or path() fallback is declared before the shape() one.path() takes an SVG path string in fixed pixel units. shape() uses CSS syntax and accepts percentages, calc() and custom properties.
Yes, between two shape() values with the same list of commands, the browser interpolates each point.