Jump to content
Search Community

Gsap Background Change Animation not working

Aayushi test
Moderator Tag

Recommended Posts

Hey, I am a beginner at gsap

In this I have to do the animation exactly like this

https://www.bennett-tea.com/tea-store#lapsang-souchong

 

But on scrolling down it is not doing that exactly and neither scrolling up. It is not working smooth and also I have to change the background exactly at the same time just like above animation does.

 

Please Help!

See the Pen eYWBqre by aayushigupt (@aayushigupt) on CodePen

Link to comment
Share on other sites

 

Hey there Aayushi!

 

Welcome to the forums! So there's a few things to look at here.


First off - before animating get the layout nailed down. I might even build the colourful block background on the left using SVG so it's nice and easy to scale and you don't have to worry about CSS grid fallbacks or layout bugs.

Secondly - This isn't a scroll triggered animation, the animation is being triggered by wheel/gesture/mouse events

Like this pen -

 

See the Pen PoWapLP by BrianCross (@BrianCross) on CodePen



Hope this helps set you in a better direction

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...