msScrollSnapX property
Specifies values for the IHTMLCSSStyleDeclaration2::msScrollSnapType and IHTMLCSSStyleDeclaration2::msScrollSnapPointsX properties.
This property is read/write.
![]() |
Syntax
HRESULT put_msScrollSnapX( [in] DOMString val ); HRESULT get_msScrollSnapX( [out] DOMString **ptr );
Property values
Type: DOMString
String format
<-ms-scroll-snap-type>
<-ms-scroll-snap-points-x>
CSS information
| Applies To | non-replaced block-level elements and non-replaced inline-block elements |
|---|---|
| Media | interactive |
| Inherited | no |
| Initial Value | (see individual properties) |
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
The IHTMLCSSStyleDeclaration2::msScrollSnapX property is a shorthand property. The following two selectors have an identical 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%);
}
Requirements
|
IDL |
|
|---|
See also
- Windows apps using JavaScript Samples: HTML scrolling, panning and zooming sample
- Internet Explorer Samples: Scrolling, panning, and zooming with touch input
Show:
