--- title: WheelEvent.deltaX slug: Web/API/WheelEvent/deltaX translation_of: Web/API/WheelEvent/deltaX ---
{{APIRef("DOM Events")}}
WheelEvent.deltaX
只读属性是一个 double
类型值, 声明水平滚动量以{{domxref("WheelEvent.deltaMode")}} 为单位.
var dX = event.deltaX;
var syntheticEvent = new WheelEvent("syntheticWheel", {"deltaX": 4, "deltaMode": 0}); console.log(syntheticEvent.deltaX);
Specification | Status | Comment |
---|---|---|
{{SpecName('DOM3 Events','#widl-WheelEvent-deltaX','WheelEvent.deltaX')}} | {{Spec2('DOM3 Events')}} | Initial definition. |