muslito Posted October 24, 2023 Share Posted October 24, 2023 I was taking a look at See the Pen e2d1d9084b18a67f9c90da7ea29a1509 by GreenSock (@GreenSock) on CodePen and its pretty much what I need but with one minor aspect that I wish I could have this functionality but instead of it being the whole page moving like that i just want one section. So mainly have the user scroll the page normally and when it hits that section then it will scroll the content like in the code pen and when its done it will continue scrolling normally. Has anyone achieve something like that but focused on a div or section and not targetted at the main html ? Link to comment Share on other sites More sharing options...
mvaneijgen Posted October 24, 2023 Share Posted October 24, 2023 Hi @muslito welcome to the forum! What have you tried already? I've add a div before all the content and it just works! If you need further assistance, we love to see minimal demo's you've created, that way we can see your thought process and thus better help you understand the tools! See the Pen ZEwYoLM by mvaneijgen (@mvaneijgen) on CodePen I've split your pen in to its own topic from: Link to comment Share on other sites More sharing options...
Solution Rodrigo Posted October 24, 2023 Solution Share Posted October 24, 2023 Hi, This shouldn't be that complicated: See the Pen XWOJGVV by GreenSock (@GreenSock) on CodePen Just play with the tools, check the docs and always use markers in order to understand better how pinning actually works. A marker says far more words than a line of code 😉 Hopefully this helps. Happy Tweening! Link to comment Share on other sites More sharing options...
muslito Posted October 25, 2023 Author Share Posted October 25, 2023 Thanks works great! I was trying similar things but at the end on the site I was integrating it , had overflow-x: hidden; in the HTML tag and that messed up the Pinning. 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