Edit in JSFiddle


              
<div class="wrap">
    <h2>2)使用 br标签和其自身的 html属性</h2>
    <div class="box1 left">box1   float:left;</div>
    <div class="box2 left">box2   float:left;</div>
    <br clear="all" />
    <!-- <br clear="left " />
    <br clear="right" /> --> 
</div>
<div class="footer">.footer</div>
.box1{
    height:100px;
    background:#99FF33;
}
.box2{
    height:100px;
    background:#FF99FF;
}
.left{
    float:left;
}
.right{
    float:right;
}
.wrap{
    border:solid 1px black; 
}
.footer{
    background:lightblue;
}