Precautions for absolute positioning in front-end layout

Be careful when using absolute positioning in front-end layouts:

Absolute positioning it out of the document flow. If the latter element does not use absolute positioning, then it will be below the absolutely positioned element. At the same time, if the previous element does not use absolute positioning. then absolutely positioned elements will still line up

At the back, will not cover. It should be because it is only out of the document flow at his position, not out of the entire document flow. (personal understanding)

Guess you like

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