1、chrome浏览器,打开一个页面

2、选中要查看的页面

手动查看页面上元素到页面顶端的距离

3、点击 Add attribute

4、添加  id="xxxx"

5、document.querySelector("#xxx").getBoundingClientRect()

手动查看页面上元素到页面顶端的距离

相关文章:

  • 2021-12-23
  • 2021-12-23
  • 2021-10-04
  • 2021-11-21
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
相关资源
相似解决方案