js 获取页面距离等,比较全的api

document.getElementById().getBoundingClientRect()


DOMRect {
bottom: 692
height: 600
left: 443
right: 817
top: 92
width: 374
x: 443
y: 92
}

 

posted @ 2021-12-03 13:43  星涑  阅读(46)  评论(0编辑  收藏  举报