client:function(){
if (window.innerWidth !== null) {//最高浏览器
return{
"width":window.innerWidth,
"height":window.innerHeight
}
}else if (document.compatMode ==="CSS1Compat") {//W3C
return{
"width":document.documentElement.clientWidth,
"height":document.documentElement.clientHeight
}
}
return{
"width":document.body.clientWidth,
"height":document.body.clientHeight
}
}
获取屏幕可视区域封装
猜你喜欢
转载自blog.csdn.net/qzcrystal/article/details/104155884
今日推荐
周排行