CSS in position properties (absolute/relative/static/fixed):
Position:static No special positioning, is the default location of HTML elements, objects follow normal document flow. Attributes such as top,right,bottom,left are not applied.
The Position:relative object follows the normal document flow, relative to its original position in the document flow, but offsets the position in the normal document flow based on attributes such as Top,right,bottom,left. And its cascade is defined by the Z-index property.
Position:absolute: objects are detached from normal document flow and are positioned according to ancestor elements (above the parent class), and the ancestor class must be posiiton for non-static mode, using Top,right,bottom, Left and other properties for absolute positioning. And its cascade is defined by the Z-index property. position:fixed: Objects are out of normal document flow, use properties such as top,right,bottom,left to position the window as a reference point, and the object does not scroll when the scroll bar appears. And its cascade is defined by the Z-index property. Document Flow: The document flows by dividing the form from top to bottom, and emitting elements from left to right in each row. situations in which an element is detached from the document flow: floating absolute positioning
Position property in CSS (absolute/relative/static/fixed)