b0nes Posted February 19, 2023 Posted February 19, 2023 So my goal is eventually to have multiple images using this animation on scroll. But I would like the image to start at 0 opacity and fade in then when it is leaving the screen to fade out. I have used another tl.fromTo before this to change its opacity but it doesnt seem fluid. Not sure if anyone could help me out with this! See the Pen LYJpMGR by colemiller21 (@colemiller21) on CodePen.
PointC Posted February 19, 2023 Posted February 19, 2023 If I understand your desired outcome correctly, I'd add a 2nd tween to the timeline which is half the duration of the position tween. That 2nd tween would animate from opacity:0 to opacity:1 Set yoyo:true and repeat:1. Make sure both tweens start at the same time with the position parameter and set the ease to your liking. Hopefully that helps. Happy tweening. 1
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