Responsive & Accessible Animation with gsap.matchMedia()

Опубликовано: 17 Август 2022
на канале: GSAP Learning
32,727
799

In this video we'll walk through the new gsap.matchMedia() and create some responsive and accessible animation! 🥳

gsap.matchMedia() lets you tuck setup code into a function that only executes when a particular media query matches and then when it no longer matches, all the GSAP animations and ScrollTriggers created during that function's execution get reverted automatically! Customizing for mobile/desktop or prefers-reduced-motion accessibility is remarkably simple.

Docs - https://greensock.com/docs/v3/GSAP/gs...)
Demos - https://codepen.io/collection/vBebgJ