Htmlcss notes -- positioning, htmlcss notes --
1. positioning:
Position: relative (relative)
Does not affect the features of elements;
Do not make element reasoning for the original document stream; it also occupies the seat.
Positioning element control: top/right/bottom/left positioning element offset.
Absolute (absolute positioning)
Disconnects elements from document streams,
Enable embedded elements to support width and height,
The width of the content of the quick attribute label is extended.
The offset relative to the entire document is not offset relative to its original position or body;
* If the parent level is located, the parent level is located relative to the parent level. If no parent level is located, the parent level is located relative to the document level.
Relative positioning is generally used in combination with absolute positioning.
The default level of the positioning element is higher than that of the former.
Positioning level: z-index: [number]; default value: 0
2. Transparency: ie incompatible; Standard: opacity: 0 ~ 1;
Private ie: filter: alpha (opacity = 0 ~ 100 );
3.
Center the login box and the entire page:
Position: absolute; top: 50%; left: 50%; margin-top:-retrial; margin-left:-Bpx;
A is the height of the logon box, B is the width of the logon box, and the border and padding must be considered,
4. pisition: fixed;
Fixed positioning;
Features are basically the same as absolute positioning, and the difference is that they are always located relative to the entire document;
Ie6 does not support fixed positioning. If compatible, it must be used with JS positioning.
5. position: inherit;
Inherited from the parent level, basically not required.
6. position: static;
Default inheritance;