--- title: DeviceOrientationEvent.beta slug: Web/API/DeviceOrientationEvent/beta translation_of: Web/API/DeviceOrientationEvent/beta ---
{{ ApiRef("Device Orientation Events") }}
返回设备旋转时X轴的值. 即: 角度的数值, 范围介于-180 ------ 180之间 表示设备正在向前或向后倾斜.更多信息见 方向和运动数据详解
var beta = instanceOfDeviceOrientationEvent.beta;
Specification | Status | Comment |
---|---|---|
{{SpecName('Device Orientation')}} | {{Spec2('Device Orientation')}} | Initial specification. |
{{CompatibilityTable}}
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|---|
Basic support | 7.0 | {{CompatVersionUnknown}} | 6 [1] | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | 3.0 | {{CompatVersionUnknown}} | 6 [1] | {{CompatNo}} | {{CompatNo}} | 4.2 |
[1] Firefox 3.6, 4, and 5 supported mozOrientation instead of the standard DeviceOrientationEvent
interface