W3cubDocs

/CSS

-ms-scroll-snap-x

Non-standard
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

The -ms-scroll-snap-x CSS shorthand property is a Microsoft extension that specifies values for the -ms-scroll-snap-type and -ms-scroll-snap-points-x properties.

Initial value as each of the properties of the shorthand:
Applies to non-replaced block-level elements and non-replaced inline-block elements
Inherited no
Media interactive
Computed value as each of the properties of the shorthand:
Animation type discrete
Canonical order the unique non-ambiguous order defined by the formal grammar

Syntax

Values

The -ms-scroll-snap-x shorthand property is specified as one or both of the following values, in order and separated by spaces.

-ms-scroll-snap-type

The value of the -ms-scroll-snap-type property.

-ms-scroll-snap-points-x

The value of the -ms-scroll-snap-points-x property.

Formal syntax

  <'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>

Examples

The -ms-scroll-snap-x property is a shorthand property. The two selectors in the following example have the same effect.

.scroll1 {
  -ms-scroll-snap-type: proximity;
  -ms-scroll-snap-points-x: snapList(100%, 200%, 300%, 400%, 500%);
}

.scroll2 {
  -ms-scroll-snap-x: proximity snapList(100%, 200%, 300%, 400%, 500%);
}

Specifications

Not part of any specification.

Remarks

This property requires Windows 8 or later.

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.

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-scroll-snap-x