此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

DeviceAcceleration

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

实验性: 这是一项实验性技术
在将其用于生产之前,请仔细检查浏览器兼容性表格

设备加速对象可以提供有关设备沿三个轴(x、y、z)的加速度的信息。

属性

DeviceAcceleration.x 只读

沿 X 轴的加速度量(只读)

DeviceAcceleration.y 只读

沿 Y 轴的加速度量(只读)

DeviceAcceleration.z 只读

沿 Z 轴的加速度量(只读)

说明

Specification
Device Orientation and Motion
# devicemotioneventacceleration