Video wird geladen...
Video konnte nicht geladen werden
CSS Tip! ✨ You can create these parallax effects and image cross-fades with scroll-driven animations 🤙 img { animation: fade; animation-timeline: view(); mix-blend-mode: plus-lighter } img:last-of-type { animation-direction: reverse; } @keyframes fade { to { opacity: 0; }} This one's fun! 😁 The trick with the cross-fading image is... show more
242,074 Aufrufe • vor 2 Jahren •via X (Twitter)
10 Kommentare

Here's that @CodePen link! 🚀 You can jam on this demo today in all browsers. There is some JavaScript in place if the scroll-driven animations API isn't supported 🤙 GSAP to the rescue! 🏆

For a little history and insight behind cross-fading with plus-lighter for folks, here is @jaffathecake's excellent article behind it:

Good share Martin! 🙏 Almost embedded in my mind from when I started working with View Transitions 😅 The number of times I pinged Jake and it was my own problem with a mix-blend-mode thing 🤦♂️ This is the spot from the View Transition docs for people interested 🤙 Jake's blog is also a gold mine of interesting deep dives, etc. 👉

Wow, how it would be in responsive mode?

Ha – Great minds... 🤙

So good. Thanks for tutorial.

Browser compatibility?

Specifically the API is Chrome only atm. But, the demo will work everywhere as I've filled the functionality with GSAP and wrapped the API stuff in a supports query so it can be ripped out easy 🤙

Lo malo es que no está soportado en todos los navegadores

The API isn't, but the demo is 🤙 Will work in all browsers
