scroll-snap-*
Properties.The following examples are overflow-scrolling div
s. In the second, third and fourth examples, the blue cross represents the location of each container’s scroll snap destination.
The CSS for the above container is:
scroll-snap-type: x mandatory;
The CSS for each of the container’s children is:
scroll-snap-align: start;
The CSS for the above container is:
scroll-snap-type: x mandatory;
The CSS for each of the container’s children is:
scroll-snap-align: start;
The CSS for the above container is:
scroll-snap-type: x mandatory;
The CSS for each of the container’s children is:
scroll-snap-align: center;
The CSS for the above container is:
scroll-snap-type: both mandatory;
The CSS for each of the container’s children is:
scroll-snap-align: center;
The CSS for the above container is:
scroll-snap-type: both mandatory;
transform: rotate(30deg);
The CSS for each of the container’s children is:
scroll-snap-align: center;
Images from NASA’s image of the day gallery.