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/outerwidth | |
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/outerwidth')
-rw-r--r-- | files/zh-cn/web/api/window/outerwidth/index.html | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/window/outerwidth/index.html b/files/zh-cn/web/api/window/outerwidth/index.html new file mode 100644 index 0000000000..fc7a7ca3db --- /dev/null +++ b/files/zh-cn/web/api/window/outerwidth/index.html @@ -0,0 +1,71 @@ +--- +title: Window.outerWidth +slug: Web/API/Window/outerWidth +translation_of: Web/API/Window/outerWidth +--- +<div> + {{APIRef}}</div> +<h2 id="Summary" name="Summary">概述</h2> +<p><code>Window.outerWidth</code> 获取浏览器窗口外部的宽度。表示整个浏览器窗口的宽度,包括侧边栏(如果存在)、窗口镶边(window chrome)和调正窗口大小的边框(window resizing borders/handles)。</p> +<p>该属性为只读,没有默认值。</p> +<h2 id="Syntax" name="Syntax">语法</h2> +<pre class="syntaxbox"><var>outWindowWidth</var> = window.outerWidth; +</pre> +<p><code>outWindowWidth</code> 是窗口的外层的宽度。</p> +<h2 id="Notes" name="Notes">备注</h2> +<p>要改变一个窗口的大小,可参考 {{domxref("window.resizeBy()")}} 和 {{domxref("window.resizeTo()")}}。</p> +<p>要获取一个窗口的内层宽度(inner width),即页面被展示的区域,请参考 {{domxref("window.innerWidth")}}。</p> +<h2 id="浏览器兼容性">浏览器兼容性</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 技术规范或推荐。<span class="comment">the To do in Notes</span></p> +<h2 id="相关链接">相关链接</h2> +<ul> + <li>{{domxref("window.outerHeight")}}, {{domxref("window.innerHeight")}}, {{domxref("window.innerWidth")}}</li> + <li>{{domxref("window.resizeBy()")}}, {{domxref("window.resizeTo()")}}</li> +</ul> |