Css positioning, css relative positioning
Div, h1, or p elements are often called block-level elements. This means that these elements are displayed
Block content, that is, block box ". In contrast, elements such as span and strong are called "rows ".
", Because their content is displayed in the row, that is," inside the line box ".
CSS has three basic Positioning Mechanisms: normal stream, floating, and absolute positioning.
Unless otherwise specified, all frames are located in the normal stream. That is to say, in a normal stream
The position of the element is determined by the position of the element in (X) HTML.
CSS position attribute:
Static relative absolute fixed
Css relative positioning
Absolute positioning makes the element position irrelevant to the Document Stream, so it does not occupy space. This and phase
Unlike positioning, relative positioning is actually considered as part of the normal stream positioning model, because
The position of an element is relative to its position in a normal stream.
Css float
A floating box can be moved to the left or right until its outer edge hits the include box or another
Until the border of the floating box.
Because the floating box is not in the normal stream of the document, the block box in the normal stream of the document is displayed
Just as the floating box does not exist.
Inline: a block-level element in a row.
Block: 1. Hide element display 2. block-level element Conversion
Inline-block: both contain