Video wird geladen...
Video konnte nicht geladen werden
Future CSS Tip! 🔮 You can power micro-interactions with scroll driven animations 😎 Define a range with custom props and hook up to body scroll 📜 .avatar{ animation:shrink; animation-timeline:scroll(root); animation-range:calc(var(--head)*0.9) ...; } CodePen.IO link below! 👇
146,987 Aufrufe • vor 3 Jahren •via X (Twitter)
10 Kommentare

Here's that @CodePen link! 🚀 Remember. Only in Chrome Canary for now 🥲 Some of that calc above is obfuscated. If you have an idea of the size of things in your header, it's not too bad working out when things should start moving ✨

@CodePen Just wondering… how many projects do you pop out a day? 😆 You’re on fire my friend!

@CodePen epic! this site’s header button hover effect is pretty cool. in case you ever make a pen for it 🥺

@CodePen It would be really cool if your avatar turned to face the read as it recedes 🤓

@CodePen What a great idea! Can totally do that too! Thanks Marc 🙏

@CodePen @mr_papoutsis

@CodePen this is cool @joshmanders

@CodePen Its not smooth tho. Kinda jumps in a weird way 🤔

@CodePen Yeah, this is one of my current gripes with the API 😕 Smooth scrubbing is basically limited to a trackpad. Using an input device like a mouse is really hard to get smooth. I'll still be reaching for GreenSock in most cases unless things like that are improved 💯

@CodePen Future is here.
