css中的clear的正真意义

网上包括w3cschool 的说法都是 不允许浮动、消除浮动 这样的说法,却看了还是不知道什么意思,一些地方说不通。

所以找到w3c css 的英文文档,如下是节选:

'clear'
Values have the following meanings when applied to non-floating block-level boxes:
left
Requires that the top border edge of the box be below the bottom outer edge of any left-floating boxes that resulted from elements earlier in the source document.
       【盒子上边框边沿位于任何左浮动盒子的外部边沿的底部】
right
Requires that the top border edge of the box be below the bottom outer edge of any right-floating 
boxes that resulted from elements earlier in the source document.
       【盒子上边框边沿位于任何右浮动盒子的外部边沿的底部】
both
Requires that the top border edge of the box be below the bottom outer edge of any right-floating and left-floating boxes that resulted from elements earlier in the source document.
none
No constraint on the box's position with respect to floats.


它的解释与 网上的说法 不太一样

【注意:不是“清除”,是“位于XX底部以下”】

原文地址:https://www.cnblogs.com/beixing/p/3784145.html