DeviceOrientationEvent.alpha

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.

返回设备旋转时 Z 轴的值;即:设备围绕屏幕中心扭转的角度。详细信息请查看方向和运动数据

Syntax

var alpha = instanceOfDeviceOrientationEvent.alpha;

Specifications

Specification
Device Orientation and Motion
# ref-for-dom-deviceorientationevent-alpha③

Browser compatibility

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
alpha

Legend

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

Full support
Full support

See also