WheelEvent.deltaMode
只读属性返回一个 unsigned long
类型的值, 声明 delta 的滚动值的单位. 可能的值为:
|
DOM_DELTA_PIXEL | 0x00 | delta 的值为 像素 级别. |
DOM_DELTA_LINE | 0x01 | delta 的值为 行 级别. |
DOM_DELTA_PAGE | 0x02 | delta 的值为 页 级别. |
var unit = event.deltaMode;
var syntheticEvent = new WheelEvent("syntheticWheel", {"deltaX": 4, "deltaMode": 0});
console.log(syntheticEvent.deltaMode);
We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains.
Find out how you can help! Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|
Basic support | 31 | (Yes) | 17.0 (17.0) | 9.0 | 18 | 7.0 |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|
Basic support | (Yes) | (Yes) | 17.0 (17.0) | ? | (Yes) | 未实现 |
发布评论