<div class="father">
<div class="box first">
一
</div>
<div class="box">
二
</div>
<div class="box">
三
</div>
<div class="clear"></div>
</div>
.box {
background-color: gray;
width: 100px;
height: 30px;
margin: 5px 5px;
float: left; /* box向左浮动 */
}
.first {
height: 50px;
}
.father {
width: 300px;
border-style: solid;
border-width: 2px;
min-height: 30px; /* 设定最小高度,模拟脱离文档流的情况 */
}
.clear {
clear: both;
}