blob: bed85e75c516f8b82169660ad6d770386165d0ab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
---
title: DeviceOrientationEvent.absolute
slug: Web/API/DeviceOrientationEvent/absolute
translation_of: Web/API/DeviceOrientationEvent/absolute
---
<p>{{ apiref("Device Orientation Events") }}</p>
<p>表示该设备是否提供绝对定位数据 (这个数据是关于地球的坐标系) 或者使用了由设备决定的专门的坐标系. 查看更多关于 <a href="/en/DOM/Orientation_and_motion_data_explained" title="Orientation and motion data explained">Orientation and motion data explained</a> 的细节.</p>
<h2 id="语法">语法</h2>
<pre class="syntaxbox">var absolute = <em>instanceOfDeviceOrientationEvent</em>.absolute;
</pre>
<p>如果方向数据跟地球坐标系和设备坐标系有差异,则<code>absolute</code>为<code>true</code>,如果方向数据由设备本身的坐标系提供,则<code>absolute</code>为<code>false</code>。</p>
<h2 id="说明">说明</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName('Device Orientation')}}</td>
<td>{{Spec2('Device Orientation')}}</td>
<td>Initial specification.</td>
</tr>
</tbody>
</table>
<h2 id="浏览器兼容性">浏览器兼容性</h2>
{{Compat("api.DeviceOrientationEvent.absolute")}}
<h2 id="参见">参见</h2>
<ul>
<li>{{ domxref("DeviceOrientationEvent") }}</li>
<li><a href="/en/Detecting_device_orientation" title="Detecting device orientation">Detecting device orientation</a></li>
<li><a href="/en/DOM/Orientation_and_motion_data_explained" title="Orientation and motion data explained">Orientation and motion data explained</a></li>
<li>{{ domxref("window.ondeviceorientation") }}</li>
<li>{{ event("deviceorientation") }}</li>
</ul>
|