Absolute position Coordinates:
Copy Code code as follows:
$ ("#elem"). Offset (). Top
$ ("#elem"). Offset (). Left
The position coordinates relative to the parent element:
Copy Code code as follows:
$ ("#elem"). Position (). Top
$ ("#elem"). Position (). Left
Other:
Static (default): The default positioning method.
Relative (relative positioning): On the basis of static, relative elements of the original position change, through the set Top,bottom,left,right implementation.
Absolute (absolute positioning): is relative to the parent element, if the parent element has relative, then the position of the element is calculated results. That is, the reference to absolute positioning is "the last positioned parent element (static does not count)". Absolute positioning causes elements to be deleted from the document stream.
Fixed (stationary positioning): The fixed position of the reference is always the current document. With fixed positioning, it is easy to locate a div on the left and right position of the browser document.