Loading video...

Video Failed to Load

Go Home

Switching word combos on scroll with CSS 🖱️ main { animation: switch both steps(3); animation-timeline: view(); } @​keyframes switch { to { --i: 3; }} .words__track { translate: 0 calc(var(--i) * -100%); } Result of a DM request 👇

92,985 views • 2 years ago •via X (Twitter)

10 Comments

jhey ▲🐻🎈's profile picture
jhey ▲🐻🎈2 years ago

Wasn't going to share this one as it was quickly thrown together 😬 May be useful to some though 🤙 Haven't put together a mobile view where could imagine everything would stack and you'd lose the animation. Nor does this fallback where no support 🥲

pavi2410's profile picture
pavi24102 years ago

What's the DOM structure like?

Andrej Maznevski's profile picture
Andrej Maznevski2 years ago

So this is what you've been cooking 🧑‍🍳

jhey ▲🐻🎈's profile picture
jhey ▲🐻🎈2 years ago

Not this haha 😂 This was like a 20 minute prototype for someone 🤙

Abdulfettah's profile picture
Abdulfettah2 years ago

When this gonna be supported on safari

Ivanchis's profile picture
Ivanchis2 years ago

👋👋👋

Soya's profile picture
Soya2 years ago

thank you! i’ll definitely implement this soon

huang deshiou's profile picture
huang deshiou2 years ago

This looks amazing! Can I ask for the code?

LcsGa 🅰️'s profile picture
LcsGa 🅰️2 years ago

Nice effect! To work properly, each part has to be of the same height, right?

ROLLA's profile picture
ROLLA2 years ago

You need to adjust the alignment of the text. It’s a little wonky

Related Videos