Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

Pretty fun seeing how you can combine different CSS tricks with scroll 😁 The basic combination of overflow: hidden and steps() animation timing makes this happen ⭐️

136,417 görüntüleme • 1 yıl önce •via X (Twitter)

10 Yorum

Jesús Rascón profil fotoğrafı
Jesús Rascón1 yıl önce

i kinda love the debug mode better lmao

jhey ▲🐻🎈 profil fotoğrafı
jhey ▲🐻🎈1 yıl önce

Could look pretty cool if the opacity was reduced on the letters outside of the clip. Perhaps it could be updated with an animated mask position 🤔

Tushar profil fotoğrafı
Tushar1 yıl önce

Post tutorial

Retro ✴️ profil fotoğrafı
Retro ✴️1 yıl önce

Looks nice but how do screenreaders process this ?

jhey ▲🐻🎈 profil fotoğrafı
jhey ▲🐻🎈1 yıl önce

Very good question ⭐️ The answer is, "fine". The trick here is to duplicate the string of text in a visually hidden <span> then apply [aria-hidden] to all of the animated text you see. That way, the reader will only pick up the string of text as expected 🤙

Nuel profil fotoğrafı
Nuel1 yıl önce

You’re a genius

S4RAH profil fotoğrafı
S4RAH1 yıl önce

This is crazy cool

JM profil fotoğrafı
JM1 yıl önce

Creative 🎨

Sumit profil fotoğrafı
Sumit1 yıl önce

It would be cool if you can make it like the animation from the matrix movie

Salih Ay profil fotoğrafı
Salih Ay1 yıl önce

🥹🥹🥹🥹🥹🥹

Benzer Videolar

CSS Tip! 📜 You can use scroll-driven animations to progressively enhance collapsing a floating call to action 🤏 .cta { animation: shrink; animation-timeline: scroll(); animation-range: 0 100px; } @​keyframes shrink { to { width: 48px; } } That's the gist of it. Use the body scroll position with animation-timeline: scroll(). Define the animation-range as when you have scrolled 100px. There's a little more though 🤓 That would "scrub" the width animation. Ideally, you want to trigger that animation. You could animate a custom property with steps() timing and use that to define the width ✨ @​property --scrub { syntax: ' '; inherits: true; initial-value: 0; } body { animation: scrub both steps(1, end); animation-timeline: scroll(); animation-range: 0 100px; } Then transition the --scrub property on the CTA and use it for the width 🤙 .cta { transition: --scrub 0.2s; width: calc(48px + (120px * (1 - (var(--scrub) / 100)))); } Other animations are a matter of preference and timing. For example, you could then make the hand wave, scale down the size, and then slide a gradient across 😉 They have the same structure and technique as the original concept. Waving the hand? 👋 Run it twice, offset the transform-origin. .hand { animation: wave both linear 2; animation-timeline: scroll(); animation-range: 30vh 50vh; transform-origin: 65% 75%; } @​keyframes wave { 50% { rotate: 20deg; } } How's it progressively enhanced? Wrap everything in a @​supports query and a @​media query. If there isn't support, users still get a good experience. It's a floating action button that's circular and already collapsed 🤙 @​supports(animation-timeline: scroll()) { @​media(prefers-reduced-motion: no-preference) {...} } Definitely have a play with the code. Amazing what we're going to be able to do with CSS alone! 🔥 CodePen.IO link below! 👇

jhey ʕ•ᴥ•ʔ

177,781 görüntüleme • 2 yıl önce