lennyvong Posted November 19, 2022 Share Posted November 19, 2022 Hello, I'm starting to learn gsap and I can't do what I want to do at all... I've been trying to pin the section with the "PINNING" for a long time now. But I don't understand what I'm doing wrong to make my pin go through my "div" below... I've looked at a lot of codepen and I can't figure it out... Please help me, I've been stuck for a long time... I would like that it passes to my divs of after at the end of the annimation of the "PINNING" and that this one does not overlap the content of below See the Pen MWXrKyL by lennyvong (@lennyvong) on CodePen Link to comment Share on other sites More sharing options...
Solution GreenSock Posted November 20, 2022 Solution Share Posted November 20, 2022 By default, if the parent element uses display: flex, then ScrollTrigger disables pinSpacing since flex sizing is handled very differently by the browser. So in your case, it looks like you want pinSpacing, so just enable it explicitly with pinSpacing: true See the Pen MWXrego?editors=1010 by GreenSock (@GreenSock) on CodePen Does that help? Link to comment Share on other sites More sharing options...
lennyvong Posted November 20, 2022 Author Share Posted November 20, 2022 13 hours ago, GreenSock said: By default, if the parent element uses display: flex, then ScrollTrigger disables pinSpacing since flex sizing is handled very differently by the browser. So in your case, it looks like you want pinSpacing, so just enable it explicitly with pinSpacing: true Does that help? Thank you so much ! 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