SegmentFault 思否javascript offsetTop是指距离其最近offsetParent父元素的top距离. The HTMLElement.offsetTop read-only property returns the distance of the current element relative to the top of the [offsetParent] offsetParent是指向 更多内容请查看https://segmentfault.com/q/1010000023864364