Ruben Zwiers retweeted
CSS Tip! 🐳
You can add little details like this scale down on scroll effect with scroll-driven animations and some sticky positioning 🤙
section {
animation: scale-down;
animation-timeline: view();
animation-range: exit;
}
@keyframes scale-down { to { scale 0.8; } ]
In this smaller example, you can lean into using the <header> position to drive an animation that scales itself down as it leaves the viewport (Seen on the Apple Vision Pro site 🍏)
The nice thing here is that if you don't have scroll-driven animations, the user still gets a good experience ✨
So how do you do it? There isn't much to it
header {
transform-origin: 50% 0%;
animation: scale-down both ease-in;
animation-timeline: view();
animation-range: exit;
view-timeline: --header;
}
@keyframes scale-down {
to { scale: 0.8 0.8; }
}
That's it. The layout makes use of position: sticky so that the <video> element stays in the shot whilst you scroll the page. As it leaves the page, it scales down inside the <header> 🫶
The other smol animation here is fading the overlay on the video out 😎 Real easy. You may notice the view-timeline you defined above for the <header> 👀
header { view-timeline: --header; }
You have a pseudoelement on the text content of the header that lives inside a <section>
header > section::before {
background: hsl(0 0% 0% / 0.75);
opacity: 1;
animation: fade both linear;
animation-timeline: --header;
animation-range: exit-crossing 0% exit 0%;
}
@keyframes fade {
to { opacity: 0; }
}
You use a slightly smaller range on this with exit-crossing to fade it out before you start the scale down animation 🤏
That's it! Thought this smaller example would be easier to grok for people 🙏 It's also covered with JavaScript if you really want it for your sites 🤙
@CodePen link below 👇
Ruben Zwiers retweeted
22 years ago, linkin park released ‘in the end’
teapawt.net/pcmedia2000s/status/17…
Ruben Zwiers retweeted
Blijf lekker thuis de volgende keer. We hoeven jullie hier niet.
Prachtig! Na de geweldige overwinning van de #PVV gaan Zwarte Pieten in Overijssel weer massaal de straat op!
Deze kanjers gaan vandaag de kinderen in Deventer blij maken! ❤️
Ruben Zwiers retweeted
Woah it doesn’t even fit one @Ginofantastico’s grandmother??
Ruben Zwiers retweeted
Bij het koffieapparaat.
'Kijk je The Last Of Us?'
'Ja!'
'Heb je de games ook gespeeld?'
'Ja!'
'Heb je gehuild tijdens het spelen van de games?'
'Ja!'
'Hoe vaak?'
'Ik denk zo'n zes keer.'
'Oke, dan wil ik best met je praten over de serie.'
Ruben Zwiers retweeted
✏️ "Zal ik jou eens tekenen?" Part 4
🎄 Kerstmis tijd van geven, blablabla.
Ik teken mijn volgers, voor gratis. Profielfoto of foto van het kerstdiner
1) Volg mij
2) Retweet dit bericht
3) Reageer hieronder
Warning: Tekening kan roast bevatten.
Ruben Zwiers retweeted
Reminder if you've bought subscriptions/memberships to content last Black Friday/Cyber Monday: it's probably set to renew for 100% of the price so cancel it 👀👀👀
Ruben Zwiers retweeted
I'm still so excited about the touchbar of my Macbook Pro - I use it like almost yearly!
Ruben Zwiers retweeted
But what is @figma going to do with $20B in Adobe Stock? I can imagine you need *some* stock images but that's a lot of credit stock.adobe.com/
Ruben Zwiers retweeted
Hoop nog steeds dat de AIVD mijn gesprekken meeleest en continu dit soort drek van mij @Rubsel moeten lezen


























