I'd like to scroll to the bottom of the page and I recently found the scroll behavior style tag. Is there a way to change the speed of smooth scrolling using a CSS style?
Related question (using JQuery): How to change speed of a smooth scroll?
The scroll-behavior property accepts two values, which essentially toggle the smooth scrolling feature on and off. auto (default): This value allows the abrupt jump between elements within the scrolling box.
If you press the mouse scroll wheel, you can move your mouse up/down and the scroll will be very smooth. Enabling a smooth scroll allows you to scroll like that with your regular wheel scroll. Smooth scrolling is also useful with keyboard shortcuts.
The scroll speed CAN be changed, adjusted, reversed, all of the above - via javascript (or a js library such as jQuery). WHY would you want to do this? Parallax is just one of the reasons.
The hash portion of the anchor link is first extracted using the hash property and it is selected with the querySelector() method. The scrollIntoView() method is then called on this selected element to smoothly scroll the page to this location. Example: HTML.
No, the smooth scrolling speed cannot be changed using CSS. The only attribute tags available are behavior tags; smooth/auto.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With