Sculpting Vectors, Polygons, Angled Section Dividers & Flowing shape-outside
clip-path clips an element to a basic shape (circle, ellipse, polygon) or an SVG path.
.circle { clip-path: circle(50% at 50% 50%); }
.triangle { clip-path: polygon(50% 0%, 0% 100%, 100% 100%); }
.star { clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
Modern landing pages often break monotony with angled section dividers using clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);.
Instead of boring horizontal lines, angled clipping gives websites modern energy and movement.
Content beneath the slanted section continues naturally in normal document flow.
.slanted-section {
background: linear-gradient(135deg, #008080, #0d9488);
clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
padding-bottom: 60px; /* Offset the diagonal angle */
}
Unlike standard floats which only wrap text around a bounding rectangle, shape-outside: circle(50%); causes inline text to wrap around the actual circular curve of the image!
CSS Shapes allow web designers to wrap content around custom geometric paths. In editorial magazine layouts, text frequently hugs circular portraits and organic contours. With shape-outside: circle(50%) and float: left, the browser recalculates line box intersections, smoothly bending paragraphs along the arc of the circle. Try resizing your browser window to observe how dynamically the fluid typography responds to the curved clipping boundary!
.float-circle {
float: left;
width: 120px;
height: 120px;
shape-outside: circle(50%); /* Text curves around circle! */
clip-path: circle(50%); /* Clips element visually */
margin-right: 20px;
}