Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

CSS Scroll-driven knockout text using SVG filter 🥊 section { filter: url(#​knockout); } section h1 { animation: shrink; } @​keyframes shrink { 0% { scale: 36; }} Animate text scale on a video overlay ✅ Knock out text using SVG filter ✅ Drive with scroll ✅

99,976 Aufrufe • vor 1 Jahr •via X (Twitter)

9 Kommentare

Profilbild von jhey ▲🐻🎈
jhey ▲🐻🎈vor 1 Jahr

Here's the @CodePen if you wanna play with it 🤙 If you want me to polyfill the scroll stuff with GSAP, lemme know and I'll update the demo 🚀

Profilbild von rawn
rawnvor 1 Jahr

clean ass effect but you got to clean up those tabs bro

Profilbild von Dave | Supabase Cult Leader
Dave | Supabase Cult Leadervor 1 Jahr

OMG you're the GOAT. i need this.

Profilbild von Stanchev Sergey {💪
Stanchev Sergey {💪vor 1 Jahr

Hey @jh3yy , looking awesome, could you please drop a link to this page if you have it. TY

Profilbild von Niklas
Niklasvor 1 Jahr

Please, we need a codepen for this 🥹

Profilbild von //pentagear.gg
//pentagear.ggvor 1 Jahr

Let's say I have a procedural animation being rendered to a canvas element, rather than a video playing. Can I translate these concepts to work with that instead???

Profilbild von jhey ▲🐻🎈
jhey ▲🐻🎈vor 1 Jahr

For real 💯 You can put anything behind it. It's an element with a black background and white color. The SVG filter jus' takes out all the white pixels 🤙

Profilbild von kehinde.code
kehinde.codevor 1 Jahr

How is the support on browsers looking like?

Profilbild von Josué Goyret
Josué Goyretvor 1 Jahr

No codepen link? 🥲💔 (Amazing effect btw)

Ähnliche Videos

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 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 element stays in the shot whilst you scroll the page. As it leaves the page, it scales down inside the 🫶 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 { view-timeline: --header; } You have a pseudoelement on the text content of the header that lives inside a 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.IO link below 👇

jhey ʕ•ᴥ•ʔ

146,064 Aufrufe • vor 2 Jahren