1👍
✅
You can do this in CSS with Scroll Snap:
- Apply
scroll-snap-type: y mandatory;
to the<html>
and<body>
elements to enable vertical snapping. - Apply
scroll-snap-align: start;
to the page element to snap to the start of the page element.
html, body {
scroll-snap-type: y mandatory; 1️⃣
}
.page {
height: 100vh;
width: 100vw;
scroll-snap-align: start; 2️⃣
}
Source:stackexchange.com