msContentZoomSnapPoints property
Defines where zoom snap-points are located.
This property is read/write.
Syntax
HRESULT put_msContentZoomSnapPoints(
[in] DOMString val
);
HRESULT get_msContentZoomSnapPoints(
[out] DOMString **ptr
);
Property values
Type: DOMString
String format
snapInterval(<start zoomfactors>, <step zoomfactors>) | snapList(<list zoomfactors>)
CSS information
Applies To | non-replaced block-level elements and non-replaced inline-block elements |
Media | interactive |
Inherited | no |
Initial Value | none |
Remarks
This property has no effect on non-zoomable elements. See IHTMLCSSStyleDeclaration2::msContentZooming for details on zoomable elements.
When a user pans or scrolls and then lifts his or her contact (for instance, a finger), the content can continue to move with inertia. Snap-points can change the animation that runs when the user lifts his or her finger so that you can adjust where the content will stop. By placing snap-points, you can make it easy for your users to manipulate your content and make your content stop at convenient or key places.
Starting with Windows 8.1, this property is also supported for touchpad interaction.
This property requires Windows 8 or later.
Examples
This example demonstrates both types of values for the IHTMLCSSStyleDeclaration2::msContentZoomSnapPoints property. In the first selector, the first snap-point is at 0%, and the interval is set to 100%. In the second selector, each snap-point is listed separately—100%, 200%, 300%, and so on.
.snappy1 {
-ms-content-zoom-snap-points: snapInterval(0%, 100%);
...
}
.snappy2 {
-ms-content-zoom-snap-points: snapList(100%, 200%, 300%, 400%, 500%);
...
}
Requirements
IDL |
Mshtml.idl |
See also
Windows apps using JavaScript Samples: HTML scrolling, panning and zooming sample
Internet Explorer Samples: Scrolling, panning, and zooming with touch input