css position positioning points

1. A total of four positioning methods

  1.   static  , the default property of this property, it does not affect the label position after setting the front, back, left and right values.

    2   relative , after using this property, you can show that the coordinates move forward, backward, left and right at the original position as the origin. After moving, the original position will always be retained, otherwise the subsequent label position will be disturbed due to displacement
      

   3   absolute ,  positioned relative to the container, front, back, left and right. If the parent container tab does not add this attribute or absolute attribute, it is relative to the entire html.

                       After adding the position: relativ\ absolute\fix three properties to the CSS of the parent container, the relative movement of the label will move forward, backward, left and right according to the border of the container where it is located. 

                       The parent container does not add anything or adds staic, the label is all located in html 

4 fixed fixed on the screen guide position, does not change the position with the scroll bar

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325052666&siteId=291194637