好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

外边距塌陷之clearance_html/css_WEB-ITnose

在一个BFC中,垂直方向上相邻的块级盒子产生外边距塌陷,本文要说一个特殊的外边距塌陷情况,即当垂直方向上,两个块级盒子之间有个浮动元素相隔时,这个时候会产生什么样的效果呢?

.outer{        overflow: auto;        width: 300px;        height: 500px;        border: 2px solid #6666FF;    }    .box{        width: 100px;        height: 100px;        font-family: "simhei";        }    .top{        margin-bottom: 20px;        background: #CC6600;    }    .float{        /*float: left;*/浮动部分被注释掉了    }    .bottom{        margin-top: 10px;            background: #33FF66;    } 

top

查看更多关于外边距塌陷之clearance_html/css_WEB-ITnose的详细内容...

  阅读:28次