清除浮动之clear:both
CSS:
.border{
background: black;
}
.float{
100px;
height: 100px;
background: red;
margin:20px 20px 20px 20px;
float: right;
}
.clear{
clear: both;
}
HTML:
<div class="border ">
<div class="float">
</div>
<div class="clear"></div>
</div>