<div class="container">
	<div class="box">純浮動</div>
</div>
<div class="container container01">
	<div class="box"> display:flow-root;</div>
</div>
<div class="container">
	<div class="box"> clear:both 清除浮動</div>
  <div style="clear:both"></div>
</div>

.container{    
  width:200px;
  background:#1A85C9; 
  padding:20px; 
  margin-bottom:40px;
  margin-right:10px;
}
.box{        
  width:150px;
  background:#4d4d4d; 
  color:#fff; 
  font-size:18px; 
  text-align:center; 
  padding:15px; 
  float:left;
}
.container01{ 
  display:flow-root;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.