diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/window/outerheight | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/api/window/outerheight')
-rw-r--r-- | files/zh-cn/web/api/window/outerheight/index.html | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/window/outerheight/index.html b/files/zh-cn/web/api/window/outerheight/index.html new file mode 100644 index 0000000000..9bc6b127af --- /dev/null +++ b/files/zh-cn/web/api/window/outerheight/index.html @@ -0,0 +1,77 @@ +--- +title: Window.outerHeight +slug: Web/API/Window/outerHeight +translation_of: Web/API/Window/outerHeight +--- +<div> + {{APIRef}}</div> +<h2 id="Summary" name="Summary">概述</h2> +<p><code>Window.outerHeight</code> 获取整个浏览器窗口的高度(单位:像素),包括侧边栏(如果存在)、窗口镶边(window chrome)和窗口调正边框(window resizing borders/handles)。</p> +<p>该属性为只读,没有默认值。</p> +<h2 id="Syntax" name="Syntax">语法</h2> +<pre class="syntaxbox"><var>outWindowHeight</var> = window.outerHeight; +</pre> +<p><code>outWindowHeight</code> 为窗口的外层的高度。</p> +<h2 id="Notes" name="Notes">备注</h2> +<p>要改变窗口的大小,请查看 {{domxref("window.resizeBy()")}} 和 {{domxref("window.resizeTo()")}}。</p> +<p>要获取窗口的内层高度,即页面被显示区域的高度,可查看 {{domxref("window.innerHeight")}}。</p> +<h3 id="Graphical_example" name="Graphical_example">图像示例</h3> +<p>下面的示意图展示了 <code>outerHeight</code> 和 <code>innerHeight</code> 两者的不同。</p> +<p><img alt="innerHeight vs outerHeight illustration" src="/@api/deki/files/213/=FirefoxInnerVsOuterHeight2.png" style=""></p> +<h2 id="Browser_compatibility" name="Browser_compatibility">浏览器兼容性</h2> +<div> + {{CompatibilityTable}}</div> +<div id="compat-desktop"> + <table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari</th> + </tr> + <tr> + <td>Basic support</td> + <td>1</td> + <td>{{CompatGeckoDesktop(1.0)}}</td> + <td>9</td> + <td>9</td> + <td>3</td> + </tr> + </tbody> + </table> +</div> +<div id="compat-mobile"> + <table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>IE Mobile</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>Basic support</td> + <td>1</td> + <td>{{CompatGeckoMobile(1.0)}}</td> + <td>9</td> + <td>9</td> + <td>3</td> + </tr> + </tbody> + </table> +</div> +<h2 id="Specification" name="Specification">规范</h2> +<p>DOM Level 0。不属于任何 W3C 技术规范或推荐。</p> +<h2 id="相关链接">相关链接</h2> +<ul> + <li>{{domxref("window.innerHeight")}}</li> + <li>{{domxref("window.innerWidth")}}</li> + <li>{{domxref("window.outerWidth")}}</li> + <li>{{domxref("window.resizeBy()")}}</li> + <li>{{domxref("window.resizeTo()")}}</li> +</ul> |