html four kinds of positioning meaning

Technology over time, they would not forget, you need to brush up on

1, static: the default value. No positioning element occurs in the normal flow (ignoring top, bottom, left, right or z-index statement).

2, relative: the relative positioning of the forming element, by top, bottom, left, right relative to its normal position is provided for positioning. It can be classified by hierarchical z-index.

3, absolute: generating absolute positioning element relative to the first parent element is positioned outside the static positioning. Position of the element by "left", "top", "right" and "bottom" predetermined attribute. It can be classified by hierarchical z-index.

4, fixed: generate absolute positioning of elements, positioned relative to the browser window. Position of the element by "left", "top", "right" and "bottom" predetermined attribute. It can be classified by hierarchical z-index.

Guess you like

Origin www.cnblogs.com/zhaogaojian/p/12001284.html