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

View in English Always switch to English

DeviceOrientationEvent:beta 属性

Baseline 2023
Newly available

Since ⁨September 2023⁩, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

安全上下文: 此项功能仅在一些支持的浏览器安全上下文(HTTPS)中可用。

DeviceOrientationEvent 接口的 beta 只读属性返回设备围绕 X 轴的旋转角度;即设备向前或向后倾斜的度数,范围在 -180 到 180 之间。有关详细信息,请参阅 Orientation 和 motion 数据解释