How to remove an element from the flow?

前端 未结 9 1708
Happy的楠姐
Happy的楠姐 2020-12-24 00:11

I know position: absolute will pop an element from the flow and it stops interacting with its neighbors.

What other ways are there to achieve this?

9条回答
  •  萌比男神i
    2020-12-24 00:36

    Try to use this:

    position: relative;
    clear: both;
    

    I use it when I can't use absolute position, for example in printing when you use page-break-after: always; works fine only with position:relative.

提交回复
热议问题