-ms-scroll-snap-points-y property
Defines where snap-points will be located along the y-axis.
This property is read/write.
Syntax
-ms-scroll-snap-points-y: snapInterval(<start length>, <step length>) | snapList(<list lengths>)
Property values
One of the following values.
snapInterval(<start length>, <step length>)
Specifies where the snap-points will be placed.- <start length> specifies where the first snap-point will be placed. This length value is either a floating-point number followed by a supported length unit or a percentage (a number followed by a percent sign (%)).
- <step length> specifies the distance between subsequent snap-points both to the left and the right of the initial snap-point. This length value is either a floating-point number followed by a supported length unit or a percentage (a number followed by a percent sign (%)).
snapList(<list lengths>)
Specifies the positions of individual snap-points as a comma-separated list of length values (either a floating-point number followed by a supported length unit or a percentage (a number followed by a percent sign (%))).- If any value specified in <list lengths> is less than that specified by the -ms-scroll-limit-y-min property, the value of -ms-scroll-limit-y-min is used.
- If any value specified in <list lengths> is greater than that specified by the -ms-scroll-limit-y-max property, the value of -ms-scroll-limit-y-max is used.
CSS information
Applies To | non-replaced block-level elements and non-replaced inline-block elements |
Media | interactive |
Inherited | no |
Initial Value | snapInterval(0px, 100%); |
Remarks
This property has no effect on non-scrollable elements.
Starting with Windows 8.1, this property is also supported for mouse, keyboard, and touchpad interaction.
This property requires Windows 8 or later.
Examples
To see an example of the -ms-scroll-snap-points-y property in use, see -ms-scroll-snap-points-x. The -ms-scroll-snap-points-x property behaves identically to the -ms-scroll-snap-points-y property, but along the y-axis.
See also
Windows apps using JavaScript Samples: HTML scrolling, panning and zooming sample
Internet Explorer Samples: Scrolling, panning, and zooming with touch input