vue 获取页面高度
mounted(){
window.onresize = () => {
return
(() => {
window.fullHeight = //获取到的高度 document.documentElement.clientHeight;
})()
};
}
获取当前盒子坐标 宽度
let box = document.documentElement('***')
***.getBoundingClientRect()
API : .top .bottom .left .right
- 上一篇 »无法获取html元素宽高度的问题
- 下一篇 »Javascript 获取页面高度,多种浏览器