What are the CSS properties that get elements out

2019-01-17 05:46发布

问题:

What are the CSS properties that get elements out of the normal flow? Such properties would be float, position:absolute etc.

This question relates to all the possible alterations of the normal flow.

回答1:

Only the following properties change the standard element's flow:

  • float: right|left
  • position: absolute|fixed

Just for completeness:

  • position: relative does not change the flow order of the element, but changes the element position relative to the normal flow position.
  • display: none removes the element of the flow (strictly speaking it does no change the element flow order because the element will not have a flow order at all)
  • visibility: hidden will maintain the element on the flow but will not display it.