Reference Links: https://www.cnblogs.com/yingsu/p/7261904.html
Floating clear outcomes and impacts are not described, to clear floating code elsewhere, there are many, each method has very clean code, I learned today is to clear the floating pseudo-class. His principle is simply another element to element has a floating nothing behind, in order to eliminate child elements because the floating and let the parent element collapse of a solution.
Code:
.clearfix: after {# clearfix add the class of the parent need to clear the floating element. Content:;. "" the display: Block; height: 0; Clear: both; visibility: hidden; }
.clearfix:after{
content:".";
display:block;
height:0;
clear:both;
visibility:hidden;
}