An Interest In:
Web News this Week
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
- March 26, 2024
- March 25, 2024
- March 24, 2024
March 13, 2019 12:07 am GMT
Original Link: https://css-tricks.com/smooth-scrolling-for-screencasts/
Smooth Scrolling for Screencasts
Let's say you wanted to scroll a web page from top to bottom programmatically. For example, you're recording a screencast and want a nice full-page scroll. You probably can't scroll it yourself because it'll be all uneven and jerky. Native JavaScript can do smooth scrolling. Here's a tiny snippet that might do the trick for you:
window.scrollTo({ top: document.body.getBoundingClientRect().height, behavior: 'smooth'});
But there is no way to control the speed or easing of that! It's likely to … Read article
The post Smooth Scrolling for Screencasts appeared first on CSS-Tricks.
Original Link: https://css-tricks.com/smooth-scrolling-for-screencasts/
Share this article:
Tweet
View Full Article