getClientRects() 和 getBoundingClientRect() 的用法和区别

getClientRects() 和 getBoundingClientRect() 的用法和区别
getBoundingClientRect()用于获得页面中某个元素的左,上,右和下分别相对浏览器视窗的位置。
getBoundingClientRect()用于获得页面中某个元素的左,上,右和下分别相对浏览器视窗的位置。