Similar to the wavy divider, here is another cool shape powered by random(): A zig-zag divider! See the Pen Random bottom Zig-Zag by Temani Afif ( @t_afif ) on CodePen. We can adjust the code to have the zig-zag on the top: See the Pen…
Building on the previous effect to create confetti buttons. Full confetti or partial confetti? Pick your favorite! See the Pen Confetti Buttons by Temani Afif ( @t_afif ) on CodePen. See the Pen Confetti Button II by Temani Afif ( @t_afif )…
After the low-quality Zig-Zag connector, here is a more robust one: a spring connector. Another fun demo powered by Anchor Positioning and border-shape Drag the circles and see how the shape behaves. Go wild with this one; it won't break!…
In a previous post, we created a fancy connector where a straight line bends (or stretches) based on the distance between the connected elements. This time, let's try a foldable zig-zag connector. Drag the circles, but be careful; the…
Do you want a cool hover effect? Using random() and modern features, you can explode any border-only shape into confetti! See the Pen Confetti Shape explosion (hover to explode!) by Temani Afif ( @t_afif ) on CodePen. Want to apply this to…
Building on a previous idea, here is a more generic implementation of range sliders with custom shapes and tooltips. No JavaScript and a lot of cool CSS features ( border-shape, shape(), Scroll-Driven Animations, @property, etc.) Minimal…
After the blob shapes, here is another shape we can build using random() to create a unique user experience. A fancy wavy divider! See the Pen Top random wavy divider by Temani Afif ( @t_afif ) on CodePen. We can adjust the code to have the…
We can get the number of siblings using sibling-count() but we cannot get the number of children yet. There is a proposal for a children-count() function, but until we get an official release, we can hack it using Scroll-Driven Animations…
Creating CSS Shapes is cool, but what about Random CSS Shapes? Thanks to the new random() function, we can generate unique shapes. A new shape appears on each page load. You never see the same shape twice. First off, blob shapes with a cool…
You can combine border-shape and border-area to easily border-only shapes with gradient coloration easily. No more hacks or complex code, just 3 lines and you're done! See the Pen Complex border-only gradient shapes by Temani Afif ( @t_afif…