- .clearfix:after {
- visibility: hidden;
- display: block;
- font-size: 0;
- content:"";
- clear: both;
- height: 0;
- }
- .clearfix {display: inline-block;}
- /* Hides from IE-mac \*/
- * html .clearfix {height: 1%;}
- .clearfix {display: block;}
- /* End hide from IE-mac */
把container的div,加一个class=“clearfix”