Search pages
Search all CSS Showcase pages by name
CSS Shapes & Clipping
Break free from the rectangle. Create polygons, circles, and custom shapes with clip-path. Make text flow around curves with shape-outside. Design like never before.
Beyond the Box
By default, everything in CSS is a rectangle. But with clip-path and shape-outside, you can create circular buttons, diagonal sections, polygon cards, and text that wraps around custom shapes. Let's escape the box!
clip-path Basics
The clip-path property lets you define a clipping region for an element. Anything outside the region is hidden.
Polygon Shapes
The polygon() function is where things get really creative. Define any shape using x,y coordinate pairs.
Real-World Examples
clip-path shines in production — diagonal hero sections, shaped profile images, and interactive hover reveals.
Welcome to Our Site
Creating dynamic, modern layouts with CSS shapes
circle()
polygon()
inset()
shape-outside: Text Flow
The shape-outside property controls how text wraps around floated elements. Create magazine-style layouts with text flowing around circles, polygons, or images.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident.
Animated Shapes
Combine clip-path with transitions and animations for eye-catching effects. clip-path is animatable when both states have the same number of points.
Browser Support & Best Practices
clip-path and shape-outside enjoy excellent modern browser support. Follow these best practices for production use.
- clip-path: Chrome 55+, Firefox 54+, Safari 9.1+
- shape-outside: Chrome 37+, Safari 10.1+, Firefox 62+
- Fallback: Elements without clip-path support display as rectangles — ensure your design still works!
- GPU acceleration: clip-path is GPU-accelerated and performs well
- Avoid complex polygons: Hundreds of points can slow down rendering
- Ensure readability: Don't clip text content — it might be hard to read
- Touch targets: Make sure clipped buttons/links are still easy to tap
- Screen readers: Clipped content is still read by assistive tech
- Start simple: Begin with basic shapes before complex polygons