The difference between scrolltop and offsettop:
ScrollTop refers to the distance that a scrollable chunk scrolls down, such as scrolling down by 10 pixels, then the scrolltop attribute value of this element is 10, and the value of this property is read-write and does not need to be set position
Offsettop is the absolute distance between the top border of the element and the top border of the parent element.
ScrollLeft: Sets or gets the distance between the left and the leftmost of the object's contents, and the value of this property is readable and writable
Offsetleft: Gets the left position of the object relative to the layout or the parent coordinate specified by the Offsetparent property.
Calls to ScrollLeft and scrolltop must be on the parent element, otherwise invalid
Taget.style.top is applied to a specific element, not to the parent element, and the position value must be set to function.
The difference between scrolltop and offsettop, the difference between Scrolltopleft and offsetleft