CSS scroll-snap-type Property
border: 1px solid #000;
scroll-snap-type: x mandatory;
The scroll-snap-type CSS property sets how strictly snap points are enforced on the scroll container in case there is one.
Specifying any precise animations or physics used to enforce those snap points is not covered by this property but instead left up to the user agent.
The following table describes the values of this property:
|When the visual viewport of this scroll container is scrolled, it must ignore snap points.
|The scroll container snaps to snap positions in its horizontal axis only.
|The scroll container snaps to snap positions in its vertical axis only.
|The scroll container snaps to snap positions in its block axis only.
|The scroll container snaps to snap positions in its inline axis only.
|The scroll container snaps to snap positions in both of its axes independently (potentially snapping to different elements in each axis).
|The visual viewport of this scroll container will rest on a snap point if it isn't currently scrolled. That means it snaps on that point when the scroll action finished, if possible. If content is added, moved, deleted or resized the scroll offset will be adjusted to maintain the resting on that snap point.
|The visual viewport of this scroll container may come to rest on a snap point if it isn't currently scrolled considering the user agent's scroll parameters. If content is added, moved, deleted or resized the scroll offset may be adjusted to maintain the resting on that snap point.
|Sets this property to its default value.
|If specified, the associated element takes the computed value of its parent element animation-delay property.
|Reverts the cascaded value of the property from its current value to the value the property
|Rollback styles to the ones specified in previous cascade layers.
|Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not.
Default CSS Property Values