Xurshed Posted June 6, 2021 Share Posted June 6, 2021 Hey guys! How can I change my background color while scrolling in ScrollTrigger in a particular coordinate of my website. I would be so glad, if any of you could help me. Thank you! Link to comment Share on other sites More sharing options...
Cassie Posted June 6, 2021 Share Posted June 6, 2021 Heya! The scrollTrigger docs are a good place to start. You'll be looking at something along these lines though... gsap.to(".section", { scrollTrigger: ".section", // start the animation when ".section" enters the viewport (once) backgroundColor: 'red' }); If you'd like any more help please create a minimal demo so we can see what you've tried. p.s. - There's a bunch of scrollTrigger demos here that are pretty useful to dig through and learn from - https://greensock.com/st-demos/ 2 Link to comment Share on other sites More sharing options...
Али К Posted June 6, 2021 Share Posted June 6, 2021 check this post 3 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now