Archetype Posted December 22, 2021 Share Posted December 22, 2021 Hi everyone I'm having some issues with scrolling horizontally using ScrollTrigger. Firstly we have one very wide section which we want to scroll and it's working fine however there's a large space towards the end, not sure where that's coming from. Secondly we have elements in the wide section which we want moving slowly to give a parallax effect (see bottom white box) however what's happening is that the box moves once the scrolling stops instead of moving with the scroll. We also want the box to move only when it's in view. Note: We have dragging setup in the main project so a user can drag horizontally however I haven't put that in the codepen. Can anyone point me in the right direction? See the Pen XWeerLZ by umarsheikh13 (@umarsheikh13) on CodePen Link to comment Share on other sites More sharing options...
Archetype Posted December 22, 2021 Author Share Posted December 22, 2021 I think I've figured it out. Scrub should be set to "true" and the container should have the exact width size of the contents otherwise it will display the extra space towards the end. Link to comment Share on other sites More sharing options...
OSUblake Posted December 22, 2021 Share Posted December 22, 2021 6 hours ago, Archetype said: Note: We have dragging setup in the main project so a user can drag horizontally however I haven't put that in the codepen. Can anyone point me in the right direction? Here are some threads that might show you the way... 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