浏览器窗口尺寸clientHeight / scrollHeight / offsetHeight / innerHeight
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                浏览器窗口尺寸clientHeight / scrollHeight / offsetHeight / innerHeight
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                https://www.cnblogs.com/nanshanlaoyao/p/5964730.html
- clientHeight:元素客戶區的大小,指的是元素內容及其邊框所占據的空間大小(經過實踐取出來的大多是視口大小)
 - scrollHeight: 滾動大小,指的是包含滾動內容的元素大小(元素內容的總高度)
 - offsetHeight: 偏移量,包含元素在屏幕上所用的所有可見空間(包括所有的內邊距滾動條和邊框大小,不包括外邊距
 
瀏覽器的視口,不包括工具欄和滾動條
獲取瀏覽器的可視窗口寬高:
對于Internet Explorer、Chrome、Firefox、Opera 以及 Safari:
- window.innerHeight? ?高度
 - window.innerWidth? ? 寬度
 
對于 Internet Explorer 8、7、6、5:
- document.documentElement.clientHeight? ?高度
 - document.documentElement.clientWidth? ? 寬度
 
或者
- document.body.clientHeight? ?高度
 - document.body.clientWidth? ? 寬度
 
轉載于:https://www.cnblogs.com/bigsister/p/10825995.html
總結
以上是生活随笔為你收集整理的浏览器窗口尺寸clientHeight / scrollHeight / offsetHeight / innerHeight的全部內容,希望文章能夠幫你解決所遇到的問題。
                            
                        - 上一篇: 性能测试需求调研分析方法
 - 下一篇: python28 excel读取模块xl