10-讨论
6.2.3 讨论
innerWidth/innerHeight
和 outerWidth/outerHeight
方法是确定你想要的实际尺寸的有用工具——当你试图测量具有边框和内边距的元素在屏幕上占据的实际空间大小时,基本的宽度和高度方法用途有限。
注意,在 jQuery(document)
或 jQuery(window)
对象上使用 innerWidth
、 innerHeight
、 outerWidth
或 outerHeight
方法将返回NaN。