MouseEvent.movementY
是只读属性,它提供了当前事件和上一个 mousemove
事件之间鼠标在水平方向上的移动值。换句话说,这个值是这样计算的 :currentEvent.movementY = currentEvent.screenY - previousEvent.screenY
.
语法
var yShift = instanceOfMouseEvent.movementY
返回值
A number
规范
Specification | Status | Comment |
---|---|---|
Pointer Lock MouseEvent.movementY |
Candidate Recommendation | Initial definition. |
浏览器兼容性
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!