- .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”
转载于:https://blog.51cto.com/6221123/1105698