The offset of an element can be obtained through four attributes:
1. OffsetHeight: The size of the space occupied by the element in the vertical direction, (pixels). Includes the height of the element, the height of the (visible) horizontal scroll bar, the height of the upper border and the height of the lower border.
2. offsetWidth: The size of space occupied by the element in the horizontal direction, (pixels). Includes the width of the element, the height of the (visible) vertical scroll bar, the height of the left border and the height of the right border.
3. offsetLeft: The pixel distance between the left outer border of the element and the left inner border containing the element;
3. offsetTop: The pixel distance between the upper outer border of the element and the upper inner border of the element containing the element;