DEV Community

Bryce Dorn
Bryce Dorn

Posted on

4 2

TikTok Loader in CSS ๐ŸŽถ

I like TikTok's loading animation, here's my attempt to recreate it with just a few lines of CSS:

A couple properties/tricks that make this possible:

mix-blend-mode

Produces the overlap effect between the two circles. There are a bunch of different values for this; the native app appears to use color-dodge but multiply looks cooler IMO ๐Ÿ˜Ž.

animation-delay

The animation-delay property is used to apply the same animation to different elements at different starting keyframes. Passing a delay of half the length of the full animation will offset it halfway, and making it negative will prevent an initial pause for the delay to end.


P.S. doesn't look like the TikTok web app has a loading animation, feel free to use this on the site @tiktokdevs ๐Ÿ˜‡ Nevermind, not true! Just noticed it.

Heroku

Deploy with ease. Manage efficiently. Scale faster.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (1)

Collapse
 
livetvchannels profile image
Trieu.iv โ€ข

Nice :) thanks!

๐Ÿ‘‹ Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someoneโ€™s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay