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 数据解释

一个数字。

规范

Specification
Device Orientation and Motion
# ref-for-dom-deviceorientationevent-beta②

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
beta

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

参见