4

I have a horizontal scrolling element that scrolls to specific sections. Originally, I just had it on overflow hidden with transition: transform 0.25s; as the transition animation, but I recently switched the overflow to scrollable with scroll-behavior:smooth This is a lot slower and a lot more tedious. Is there any way to easily speed this up with css or vanilla javascript? Something like scroll-behavior-speed would be nice or changing the positioning in some other way if needed. I am currently using scrollLeft in javascript in order to move.

script
  • 55
  • 4
  • you should post snippet/code so anyone who wishes to answer your question has something to start with. – syarul Nov 07 '20 at 03:03
  • Does this answer your question? [How to change scroll behavior (e.g. speed, acceleration) on website?](https://stackoverflow.com/questions/55472649/how-to-change-scroll-behavior-e-g-speed-acceleration-on-website) – Gangula Nov 07 '20 at 06:43
  • @Gangula no, I had come across that while searching. I already have scroll behavior set to smooth. My problem is that the "smooth scroll" animation is painfully slow sometimes. I would like it to be faster and preferably with no acceleration on it. It seems like you should be able to change these properties as you are able to with transitions. – script Nov 07 '20 at 23:07

0 Answers0