Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
March 13, 2019 12:07 am GMT

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:    Share on Facebook
View Full Article

CSS Tricks

A Web Design Community curated by Chris Coyier

More About this Source Visit CSS Tricks