你的位置:首页 > 软件开发 > Java > 使用$(window).width(),window.outerWidth,window.innerWidth,document.documentElement.clientWidth,document.body.clientWidth的区别与兼容分析

使用$(window).width(),window.outerWidth,window.innerWidth,document.documentElement.clientWidth,document.body.clientWidth的区别与兼容分析

发布时间:2017-03-30 12:00:43
下面先以谷歌为例做数据分析,兼容性问题后面再说。先上一张图(图最好理解):firebug打印结果:使用$(window).width()与$(window).height():1349 392使用window.outerWidth与window.outerHeight:1366 ...

使用$(window).width(),window.outerWidth,window.innerWidth,document.documentElement.clientWidth,document.body.clientWidth的区别与兼容分析

下面先以谷歌为例做数据分析,兼容性问题后面再说。

先上一张图(图最好理解):

使用$(window).width(),window.outerWidth,window.innerWidth,document.documentElement.clientWidth,document.body.clientWidth的区别与兼容分析

firebug打印结果:

使用$(window).width()与$(window).height():1349 392使用window.outerWidth与window.outerHeight:1366 728使用window.innerWidth与window.innerHeight:1366 392使用document.documentElement.clientWidth与document.documentElement.clientHeight:1349 392使用document.body.clientWidth与document.body.clientHeight:1349 2970

 

海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com

原标题:使用$(window).width(),window.outerWidth,window.innerWidth,document.documentElement.clientWidth,document.body.clientWidth的区别与兼容分析

关键词:ie

ie
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。