This page is about scrolling in the internet context (http, html, javascript).
Scrolling is implemented by the browser in response to:
Via the scrollbar
The scrollbar appears when the viewport is smaller than the rendered document.
This process is started by clicking on a anchor with a URL fragment
When navigating, the scroll occurs after the DOMContentLoaded event. Within this event, you can still manipulate the DOM to add a target element for fragment 1)
For the developer, you can also scroll to an element via the devtool elements pane.
ScrollTop 2) is the number of pixels that an element's content is scrolled vertically (webapi)
When scrollTop is used on the root element (the <html> element), the scrollY of the window is returned
// document element = root element = html element
let scrollTopLog = () => { scrollTopElement.innerText = parent.document.documentElement.scrollTop; };
jQuery(window).scrollTop()
In the other X axis, you have also the ScrollLeft.
You can respond to scroll with the scroll event.
animating elements as they enter/leave the viewport.
Add and suppress class while you scroll
Presentation:
Full page vertical scrolling:
http://callmecavs.com/jump.js/
o.addEventListener("click", function(e) {
e.preventDefault(),
t.Jump.jump(".steps", {
duration: 1e3,
offset: -r
})
});
https://gomakethings.com/how-to-animate-scrolling-to-anchor-links-with-one-line-of-css/
You disable:
disable-scrolling {
overflow-y: hidden;
}