Relative Positioning
A relative positioned element is positioned relative to its normal position.
The reserved space for the element is still preserved in the normal flow.
relative 位置是相对元素的父元素的位置。left, top 是相对其父元素进行调整, 但是位置还是和DOM中的看起来一致(in normal flow)。
Absolute Positioning
An absolute position element is positioned relative to the first parent element that has a position other than static
Absolutely positioned elements are removed from the normal flow.
absolute 位置是相对第一个具有position(fixed, relative, absolute) 属性的父元素位置, 实际位置可能和DOM中的不一致(be removed from the normal flow)。