WheelEvent.deltaX

WheelEvent.deltaX 只读属性是一个 double 类型值,声明水平滚动量以WheelEvent.deltaMode 为单位。

语法

var dX = event.deltaX;

例子

var syntheticEvent = new WheelEvent("syntheticWheel", {"deltaX": 4, "deltaMode": 0});

console.log(syntheticEvent.deltaX);

规范

Specification Status Comment
Document Object Model (DOM) Level 3 Events Specification
WheelEvent.deltaX
Obsolete Initial definition.

浏览器兼容性

BCD tables only load in the browser

另见