非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。
-ms-scroll-translation
CSS
特性为
Microsoft extension
that specifies whether vertical-to-horizontal scroll wheel translation occurs on the specified element.
| 初始值 |
none
|
|---|---|
| 适用于 | 所有元素 |
| 继承 | yes |
| 计算值 | 如指定 |
| 动画类型 | discrete |
vertical-to-horizontal
Vertical to horizontal translation, as described in 备注 , will take place when appropriate.
none
No scroll wheel translation takes place.
inherit
The initial value. The value is inherited from the element's parent element.
none | vertical-to-horizontal
Not part of any specification.
This property requires Windows 8 or later.
This property has no effect on non-scrollable elements.
If your JavaScript is listening for scroll wheel Document Object Model (DOM) events, the events that occur when the user scrolls vertically will always be vertical scroll events, not horizontal scroll events. Similarly, the events that occur when the user scrolls horizontally will always be horizontal scroll events. This property enables you to change this behavior for vertical scroll events. By setting the
-ms-scroll-translation
property to
vertical-to-horizontal
, you are specifying that vertical scroll events should be interpreted as their corresponding horizontal scroll events.
This property's initial value is
inherit
on all elements, except the
<html>
element, where it defaults to
none
.
This property has no effect on keyboard interaction.
The default CSS templates for Windows apps using JavaScript, "ui-light.css" and "ui-dark.css", set this property to
vertical-to-horizontal
by default on the
<html>
元素。