We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

概述

Window.outerWidth 获取浏览器窗口外部的宽度。表示整个浏览器窗口的宽度,包括侧边栏(如果存在)、窗口镶边(window chrome)和调正窗口大小的边框(window resizing borders/handles)。

该属性为只读,没有默认值。

语法

outWindowWidth = window.outerWidth;

outWindowWidth 是窗口的外层的宽度。

备注

要改变一个窗口的大小,可参考 window.resizeBy()window.resizeTo()

要获取一个窗口的内层宽度(inner width),即页面被展示的区域,请参考 window.innerWidth

浏览器兼容性

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1 1.0 (1.7 or earlier) 9 9 3
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support 1 1.0 (1.0) 9 9 3

规范

DOM Level 0。不属于任何 W3C 技术规范或推荐。the To do in Notes

相关链接

文档标签和贡献者

此页面的贡献者: teoli, AlexChao
最后编辑者: AlexChao,