Jump to content
Search Community

Horizontal scroll speed issue

Roman S. test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

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:

  1. 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.
  2. When scrolling, background image also moves, I'd like to avoid it. Also, there are friezes, maybe it's because of the background.
  3. ( 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

  • Solution

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🙌

  • Like 1
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...