zoukankan      html  css  js  c++  java
  • 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底部以下”】

  • 相关阅读:
    《JavaScript语言精粹》学习心得
    Linq笔记
    关于缓存
    JS-替换全部全部字符串
    相同数据用分号分割
    单例模式
    es6- ArrayBuffer
    vue常用属性解释。
    装饰者模式
    中介者模式
  • 原文地址:https://www.cnblogs.com/beixing/p/3784145.html
Copyright © 2011-2022 走看看