Jump to content
GreenSock

Nora

take 4 duration to appeared and 1 duration to disappeared gsap scrollTrigger

Recommended Posts

is it possible to make a text take 4 duration to appeared but 1 duration to disappeared?

 

See the Pen mdxGdxQ by nora10 (@nora10) on CodePen

Link to comment
Share on other sites

Hey there. Sure! You can use the callbacks to trigger an animation instead of toggle Actions. That will give you more control over differing entrance and exit animations.

for example - something like this.
 

ScrollTrigger.create({
 onToggle: (self) => {
   gsap.to(element, {
     opacity: self.isActive ? 1 : 0,
     duration: self.isActive ? 4 : 1
   })
 },
})

 

  • Like 1
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.
×