DEV Community

Cover image for Making a CSS blob
Mattia Astorino
Mattia Astorino

Posted on

31 9

Making a CSS blob

Some days ago i was trying to make an animated blob using just the CSS as a personal experiment and research. The big issue with the blob was the curvy-shape that was should randomly morph with a slow animation.

The only way i found to make this kind of transformation is using the multi-step border-radius values that allow you have more controls over the edge of the element.


Image from Medium

First I needed to read more informations about the multi step border-radius, and this css-tricks article was perfect. So i started writing code to prepare all the things but i noticed immediately that handling the multi values border radius was not so easy as I expected. After a bit of googling I came on this article and their awesome tool. This helped me to learn more about this approach and generating the values of the border-radius property.

By adding a bit of movement and colours I got what i wanted. Here you can check the final result.

Follow me to get more about CSS tricks!

https://equinsuocha.io

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (4)

Collapse
 
brianemilius profile image
Brian Emilius

This is line watching a digital lava lamp!
Nice work :)

Collapse
 
vitalcog profile image
Chad Windham

Nice! A lot of people downplay CSS. But it takes a LOT of time and effort to get really good at it! Thanks for sharing this!

Collapse
 
supremebeing09 profile image
nils binder 🏳️‍🌈

I'm so glad my tool helped you to build what you wanted to. And your animation looks stunning. I may use something like this in my next project :-)

Collapse
 
equinusocio profile image
Mattia Astorino

Your tool is pretty awesome. Really helped me to visualize the shapes.

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay