Device Orientation Events
表示该设备是否提供绝对定位数据 (这个数据是关于地球的坐标系) 或者使用了由设备决定的专门的坐标系。查看更多关于 Orientation and motion data explained 的细节。
语法
var absolute = instanceOfDeviceOrientationEvent.absolute;
如果方向数据跟地球坐标系和设备坐标系有差异,则absolute为true,如果方向数据由设备本身的坐标系提供,则absolute为false。
说明
浏览器兼容性
参见
- DeviceOrientationEvent
- Detecting device orientation
- Orientation and motion data explained
- window.ondeviceorientation
deviceorientation
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
