Jump to content
Search Community

Slow scrolling speed on mobile/touch screens.

Ziafat Ali test
Moderator Tag

Recommended Posts

1 hour ago, Ziafat Ali said:

Testing on Android browser and only the horizontal scroll cads scrolls slowly and other scrolls normally

 

The reason for that might be that you are using a hard-coded relative value for your end.

Speed is equal to distance of movement of something over time - which in scrubbed ScrollTriggers translates to distance of movement of your animated elements over the scroll-distance you define via start and end of your ScrollTrigger.

Thus a change of speed is to be expected when using hard-coded values like you do, because the ratio of movement of your animation to distance of scroll (which as explained results in the speed) will likely change at some point when the width of the window changes.


Have a look at this pen; resize it and watch the value in the upper left corner change with your hard-coded value as its basis.

See the Pen GRzbGKN by akapowl (@akapowl) on CodePen

 

 


If you want to make the speed equal across all browser-widths, use a value for your end, that will change in the same way, as the value for your animation will - e.g. that exact value itself (will feel most natural) - and make sure to also use it as a function-based value if you want it to react to resizing.

Does that work better for you?

See the Pen vYbqrEK by akapowl (@akapowl) on CodePen



 

  • Like 2
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...