Search

Scroll snap

Scroll snap

The CSS scroll snap property allows you to provide a more predictable and controlled user experience by controlling the scrolling behavior of a container element by defining snap points (specific positions) within the scrollable area.

.container
  scroll-snap-type: y mandatory;

.container item {
  height: 100h;
  scroll-snap-align: start;
}