Roman S. Posted December 24, 2022 Share Posted December 24, 2022 I connected a horizontal scroll that has the full width of its content and scrolls at a different speed. This was followed by several problems: Instead of different speed I'd like to have a certain, it seems to depend on the width of the user screen and Idk how to implement it. When scrolling, background image also moves, I'd like to avoid it. Also, there are friezes, maybe it's because of the background. ( I'm sorry if this is out of the scope I’m not sure I can ask it here ) the width of the yellow line is constantly changing how can I make it fixed ? This code is given below, thanks in advance and I apologize if the question is not provided correctly, please let me know if something is wrong. See the Pen JjBdxBy?editors=1100 by 1kiritos1 (@1kiritos1) on CodePen Link to comment Share on other sites More sharing options...
Roman S. Posted December 24, 2022 Author Share Posted December 24, 2022 https://1kiritos1.github.io/hosted-assets/ This page on GitHub ( for easy browsing ) Link to comment Share on other sites More sharing options...
Solution GreenSock Posted December 24, 2022 Solution Share Posted December 24, 2022 Welcome to the forums, @Roman S. If you want the background to stop during the pin, just pin the entire container instead. And as for the speed, I'm not entirely sure what you want that to be based on (currently it's based on the width), but you could just use a multiplier in the "end" value: See the Pen zYLGXbO by GreenSock (@GreenSock) on CodePen Better? Thanks for providing such a clear minimal demo! 🙌 1 Link to comment Share on other sites More sharing options...
Roman S. Posted December 24, 2022 Author Share Posted December 24, 2022 Yes, it worked out, thank you! Looks like the line question is out of line, I’m sorry. Thank you again! 10 hours ago, GreenSock said: Welcome to the forums, @Roman S. If you want the background to stop during the pin, just pin the entire container instead. And as for the speed, I'm not entirely sure what you want that to be based on (currently it's based on the width), but you could just use a multiplier in the "end" value: Better? Thanks for providing such a clear minimal demo! 🙌 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