非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。
-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
特性。
| 初始值 |
as each of the properties of the shorthand:
|
|---|---|
| 适用于 | non-replaced block-level elements and non-replaced inline-block elements |
| 继承 | no |
| 计算值 |
as each of the properties of the shorthand:
|
| 动画类型 | discrete |
-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
特性。
-ms-scroll-snap-points-x
The value of the
-ms-scroll-snap-points-x
特性。
<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>
-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%);
}
Not part of any specification.
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.