实现两列等高布局的方法
一、使用padding和margin属性
HTML
<div class="box">
<div class="child-orange">左黄</div>
<div class="child-green">右绿</div>
</div>
CSS
.box{
overflow: hidden;
resize: vertical;
}
.child-green{
background-color: green;
float: left;
}
.child-orange{
background-color: orange;
float: left;
}
.child-orange, .child-green{
margin-bottom: -600px;
padding-bottom:600px;
}
看效果: