aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/window/ondeviceorientation
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/window/ondeviceorientation
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/window/ondeviceorientation')
-rw-r--r--files/zh-cn/web/api/window/ondeviceorientation/index.html47
1 files changed, 47 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/window/ondeviceorientation/index.html b/files/zh-cn/web/api/window/ondeviceorientation/index.html
new file mode 100644
index 0000000000..672cc0aaa3
--- /dev/null
+++ b/files/zh-cn/web/api/window/ondeviceorientation/index.html
@@ -0,0 +1,47 @@
+---
+title: Window.ondeviceorientation
+slug: Web/API/Window/ondeviceorientation
+translation_of: Web/API/Window/ondeviceorientation
+---
+<p>{{ ApiRef() }}</p>
+
+<h2 id="Summary" name="Summary">简介</h2>
+
+<p>{{ event("deviceorientation") }}事件的事件处理程序,该事件包含了设备的相对旋转方向改变信息。</p>
+
+<h2 id="Syntax" name="Syntax">语法</h2>
+
+<pre class="syntaxbox">window.ondeviceorientation = function(event) { ... };
+window.addEventListener('deviceorientation', function(event) { ... });
+</pre>
+
+<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>
+
+<p>{{ page("/en-US/docs/Web/API/DeviceOrientationEvent","Browser_compatibility") }}</p>
+
+<h2 id="更多资料">更多资料</h2>
+
+<ul>
+ <li>{{ event("deviceorientation") }}</li>
+ <li>{{ domxref("DeviceOrientationEvent") }}</li>
+ <li><a href="/en/Detecting_device_orientation" title="Detecting device orientation">Detecting device orientation</a></li>
+</ul>