mCat006 Posted March 22, 2021 Share Posted March 22, 2021 Hello Community, I'm starting my adventure with ScrollTrigger. Generally I want to copy effect from http://markup.io here is my CodeSandbox https://codesandbox.io/s/gsap-demo-7e6hl?file=/src/components/Carousel/Carousel.js On bottom of every section is generated big unnecessary spacing. Images will be with different height and they always will be from center to the right edge of the screen. I would be grateful for any suggestions on how to fix and improve this. Thanks! Link to comment Share on other sites More sharing options...
GreenSock Posted March 22, 2021 Share Posted March 22, 2021 Welcome to the forums, @Mateusz K.! I'm not entirely sure what you're looking for there but it sounds like maybe you just need to set pinSpacing: false. Does that help? By default, ScrollTrigger will add padding to the bottom of your pinned element in order to push other things down on the page for the duration of the pin so they "catch up" exactly when it become unpinned. But you can easily disable that by setting pinSpacing: false. Hopefully the docs help make it clear too. Happy tweening! 1 1 Link to comment Share on other sites More sharing options...
mCat006 Posted March 22, 2021 Author Share Posted March 22, 2021 Hello, it helps. Also adding height for element in css helps too. Thanks a lot! 1 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