Ivan Mocs Posted February 7 Share Posted February 7 Is it possible to scroll through text in a pinned container? See the Pen JjzBZKy by adeivan (@adeivan) on CodePen Link to comment Share on other sites More sharing options...
Rodrigo Posted February 7 Share Posted February 7 Hi, You can definitely do that, but without pin spacing it'd look odd IMHO. Here is a simple demo that moves the text content of a pinned section: See the Pen NWMZrbj by GreenSock (@GreenSock) on CodePen Hopefully this helps. Happy Tweening! Link to comment Share on other sites More sharing options...
Ivan Mocs Posted February 7 Author Share Posted February 7 this is my update code codepen.io/adeivan/pen/JjzBZKy I've tried it, and it works, but how do I get the scrolling on each section to finish before the other section enters? I used pinSpacing: false to get the section stack effect Link to comment Share on other sites More sharing options...
Ivan Mocs Posted February 7 Author Share Posted February 7 8 hours ago, Ivan Mocs said: Is it possible to scroll through text in a pinned container? this is my update code codepen.io/adeivan/pen/JjzBZKy I've tried it, and it works, but how do I get the scrolling on each section to finish before the other section enters? I used pinSpacing: false to get the section stack effect Link to comment Share on other sites More sharing options...
Solution Rodrigo Posted February 8 Solution Share Posted February 8 Hi, Maybe something like this: See the Pen yLwxpjZ by GreenSock (@GreenSock) on CodePen Just use two different ScrollTriggers, one for pinning and another for the animation and just do some math in order to finish the animation once the next section appears at the bottom of the screen. This whole setup depends that each section has to be 100vh, getting around that requires more logic and time I'm afraid. Hopefully this helps. Happy Tweening! 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