Share Posted September 9, 2022 Hello everyone, reading other people code I noticed this effect, it animates and fades the boxes towards top. My question is what "-=0.4" value at the end of this line does? gsap.to(".green", { duration: 0.6, ease: "power2.in", y: -100, opacity: 0, stagger: 0.05 }, "-=0.4"); Link to comment Share on other sites More sharing options...
Solution Solution Share Posted September 9, 2022 That is the position parameter. It will do nothing in this case, because there is not a previous tween. `-=0.4` means it will start 0.4 seconds before the previous tween finishes, `+=0.4` would mean that it starts 0.4 seconds after the previous tween finishes. Take a look at the learning page for a more in depth explanation and a lot more features. 1 Link to comment Share on other sites More sharing options...
Author Share Posted September 9, 2022 Thank you!!! 31 minutes ago, mvaneijgen said: That is the position parameter. It will do nothing in this case, because there is not a previous tween. `-=0.4` means it will start 0.4 seconds before the previous tween finishes, `+=0.4` would mean that it starts 0.4 seconds after the previous tween finishes. Take a look at the learning page for a more in depth explanation and a lot more features. 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