Skip to content

Element.getBoundingClientRect()

Element.getBoundingClientRect() 方法返回一个 DOMRect 对象,其提供了元素的大小及其相对于视口的位置

return:

  • x, y
  • left, top, right, bottom
  • width, height

图例

2025( )
今日 25.00%
本周 14.29%
本月 54.84%
本年 20.82%
Powered by Snowinlu | Copyright © 2024- | MIT License