The scroll-snap-type property specifies whether a scroll container enforces snap positions, which axes are affected, and how strict the snapping is. Syntax: none | [ x | y | block | inline | both ] [ mandatory | proximity ]?.scroller {
scroll-snap-type: x mandatory;
}.scroller {
scroll-snap-type: both proximity;
}noneThe default value. The scroll container must not snap.xSnap on the physical x axis.ySnap on the physical y axis.blockSnap on the logical block axis.inlineSnap on the logical inline axis.bothSnap independently on both axes.mandatoryThe container is required to snap to a position when scrolling completes — always shows a snapped element.proximityThe container may snap if near a snap position — the UA decides the threshold.CSS Scroll Snap Module Level 1Editor's DraftW3CMDN123Show all codeEdit CSS onlineThe plugin that remembers hundreds of CSS items for youEvery CSS property — in a live demonstrationThe bilingual CSS referencedefinitionexamplessyntaxmodulespecificationsourcesvisual demonstrationpreviousnext