aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/document/hidden
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/document/hidden
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/document/hidden')
-rw-r--r--files/zh-cn/web/api/document/hidden/index.html44
1 files changed, 44 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/document/hidden/index.html b/files/zh-cn/web/api/document/hidden/index.html
new file mode 100644
index 0000000000..f9db5934d8
--- /dev/null
+++ b/files/zh-cn/web/api/document/hidden/index.html
@@ -0,0 +1,44 @@
+---
+title: Document.hidden
+slug: Web/API/Document/hidden
+translation_of: Web/API/Document/hidden
+---
+<p>{{ ApiRef("DOM") }}</p>
+
+<p><code><strong>Document.hidden</strong></code> (只读属性)返回布尔值,表示页面是(true)否(false)隐藏。</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox">var <em>string</em> = document.hidden</pre>
+
+<h2 id="例子">例子</h2>
+
+<pre class="brush:js;">document.addEventListener("visibilitychange", function() {
+ console.log( document.hidden );
+ // Modify behavior...
+});</pre>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th>Specification</th>
+ <th>Status</th>
+ <th>Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('Page Visibility API','#dom-document-hidden', 'Document.hidden')}}</td>
+ <td>{{Spec2('Page Visibility API')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+
+
+<article>
+<p>{{Compat("api.Document.hidden")}}</p>
+</article>