A CSS-only Zig-Zag edge
How much code is needed to create a Zig-Zag edge?
- One Property
- One Gradient
Use an online generator to easily get the code: css-generators.com/custom-borders
.zig-zag {
mask: conic-gradient(from -45deg at bottom,#000 90deg,#0000 0) 50% / 60px 100%;
}
See the Pen CSS only Zig-Zag edge by Temani Afif (@t_afif) on CodePen.
More detail: css-tricks.com/css-borders-using-masks