其他分享
首页 > 其他分享> > Collapsing margins

Collapsing margins

作者:互联网

Collapsing margins

Horizontal margins never collapse

.outer{
    width: 300px;
    height: 300px;
    background-color: tomato;
}
.inner{
    width: 100px;
    height: 100px;
    background-color: cornflowerblue;
    margin-top: 100px;
}
<div class="outer">
    <div class="inner"></div>
</div>

解决方案

标签:color,Collapsing,100px,height,width,background,margins
来源: https://www.cnblogs.com/zhumenglong/p/16483625.html