Sukru Posted March 10, 2022 Share Posted March 10, 2022 Hello, i want to move the animation in the codepen link with the scrolltrigger on scroll, can you help? See the Pen jOagBpB by sukruemanet (@sukruemanet) on CodePen Link to comment Share on other sites More sharing options...
mvaneijgen Posted March 10, 2022 Share Posted March 10, 2022 Hey, is something like this what you're looking for? See the Pen wvPVdBg?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen I've wrapped your animation in a scrollTrigger.batch to add a trigger on each element. You can play with the start and end positions to have it start earlier or later when scrolling. That is what the markers are for. Take a look at the docs if you want to learn more https://greensock.com/docs/v3/Plugins/ScrollTrigger/static.batch() you can also add the following css to `.img_container` and then set `autoAlpha: 0` to the first animation to make them hidden at page load and only show them when animating // css .img_container{ visibility: hidden; } // js tl.from(batch, {y: 100, duration: 1, ease: "power2.outIn", autoAlpha: 0}) 4 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