How to Create Organic Animated CSS Blobs with Border-Radius
To create an organic CSS blob shape, declare an 8-value border-radius using the slash syntax (e.g. border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%). The first four values define horizontal radii and the last four define vertical radii. Animate these values across 4 keyframe stops for a perpetual liquid morphing effect.
Step 1: Understanding 8-Value Border Radius Math
Standard border-radius takes up to 4 values (top-left, top-right, bottom-right, bottom-left). Adding a slash allows you to define elliptical corners with independent horizontal and vertical radii.
.organic-blob {
width: 300px;
height: 300px;
background: linear-gradient(135deg, #a855f7, #6366f1);
border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
box-shadow: 0 15px 35px rgba(99, 102, 241, 0.35);
}
Step 2: Smooth 60fps Morphing Animation
To make the blob feel alive, interpolate between 3 different border-radius states using CSS keyframes with ease-in-out timing.
@keyframes morph {
0%, 100% {
border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
transform: rotate(0deg);
}
50% {
border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
transform: rotate(180deg);
}
}
.morphing-blob {
animation: morph 8s ease-in-out infinite alternate;
}
Next-Level Addons: Creative Ways to Style Morphing Blobs
Once your blob is morphing smoothly, you can combine it with filters, 3D transforms, and lighting to create futuristic visual hero pieces:
When building high-performance UI animations or particle systems, my golden rule is: never calculate layout triggers (like getBoundingClientRect() or offsetHeight) inside animation loops. Read measurements once upfront and use CSS transforms or Canvas for buttery 60fps.
Frequently Asked Questions
Practical answers to common questions about 8-value border-radius math, keyframe morphing, and media masking.
How does the slash syntax in border-radius work?
The values before the slash define the horizontal radii for the four corners, while the values after the slash define the vertical radii. This produces elliptical corners rather than circular ones.
Can you use images or videos inside an animated CSS blob?
Yes! Apply 'overflow: hidden' to the blob container, and place an img or video element set to 'width: 100%; height: 100%; object-fit: cover' inside it. Alternatively, use 'background-image' with 'background-size: cover'.
What is the performance difference between CSS blobs and SVG path morphing?
CSS border-radius blobs are computationally cheaper than SVG path morphing because they avoid complex vector geometry recalculations. They run directly on the browser compositor layer at steady 60fps.
Can you click-detect or trigger hover effects strictly inside the organic blob boundary?
Standard HTML <div> elements retain rectangular pointer hitboxes even with rounded corners. To clip the clickable area strictly to the organic shape, combine the border-radius blob with a CSS clip-path or use an inline SVG path with pointer-events: visiblePainted.
How do you make an animated CSS blob responsive across different screen sizes?
Use percentage-based border-radius values alongside width: min(350px, 85vw) and aspect-ratio: 1. Because the border-radius coordinates are declared in percentages rather than fixed pixels, the organic curvature scales proportionally across all viewport widths.