offsetTop、getBoundingClientRect().top

1、offsetTop

元素相对于整个网页的top值;

2、getBoundingClientRect().top

相对于浏览器可视区域的top;

3、clientX 

返回当事件被触发时鼠标指针向对于浏览器页面的X坐标。

4、clientY

返回当事件被触发时鼠标指针向对于浏览器页面的Y坐标。

原文地址:https://www.cnblogs.com/yangqing22/p/14513097.html