Menu Home

scroll-snap-align

osbo.com | CSS | Properties | scroll-snap-align

The scroll-snap-align CSS property specifies the box's snap position as an alignment of its snap area within its snap container's snapport.

Syntax

CSS

scroll-snap-align: value;

JS

object.style.scrollSnapAlign = "value";

Values

<'scroll-snap-align'> = [ none | start | end | center ]{1,2}
none

This box does not define a snap position in the specified axis.

start

Start alignment of this box's scroll snap area within the scroll container's snapport is a snap position in the specified axis.

end

End alignment of this box's scroll snap area within the scroll container's snapport is a snap position in the specified axis.

center

Center alignment of this box's scroll snap area within the scroll container's snapport is a snap position in the specified axis.

Initial

none

Examples

none

start

end

center

JS

Internal

scroll-snap-stop

scroll-snap-type

External

World Wide Web Consortium (W3C)