Building Your Learning Module...
Getting things ready for you!
Find videos you like?
Save to resource drawer for future reference!
shape-outside property makes text wrap around custom shapes instead of just rectangles. Perfect for magazine-style layouts!shape-outside - Defines the shapeshape-margin - Space around shapeshape-image-threshold - Image transparency thresholdshape-outside: circle(50%);shape-outside: ellipse(50% 30%);shape-outside: polygon(0 0, 100% 0, 50% 100%);shape-outside: url(image.png);<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<div class="container">
<h1>๐ CSS Shapes Demo</h1>
<div class="example">
<span class="label">Text wrapping around circle</span>
<div class="content">
<div class="circle-shape">
Circle
</div>
<p>
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.
Notice how the text flows naturally around the circular shape!
This creates magazine-style layouts that were impossible with just CSS before.
The shape-outside property defines the shape, and shape-margin adds spacing.
You can use circles, ellipses, polygons, or even images.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia.
</p>
</div>
</div>
<div class="example">
<span class="label">Text wrapping around triangle</span>
<div class="content">
<div class="polygon-shape">
Triangle
</div>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
With polygon shapes, you can create any custom shape you want!
The text flows around the triangular shape on the right side.
This technique works great for creating unique, eye-catching layouts.
Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Remember that shape-outside only works on floated elements, so make sure
to add float: left or float: right to your shaped element.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore.
</p>
</div>
</div>
</div>
</body>
</html>Loading preview...
float: left;shape-margin: 20px;clip-path: circle(50%);shape-outside: url(shape.png);