clearfix is defined as follows:
<span style="color: #800000;">.clearfix:after</span>{<span style="color: #ff0000;">visibility</span>:<span style="color: #0000ff;">hidden</span>;<span style="color: #ff0000;">display</span>:<span style="color: #0000ff;">block</span>;<span style="color: #ff0000;">font-size</span>:<span style="color: #0000ff;">0</span>;<span style="color: #ff0000;">content</span>:<span style="color: #0000ff;"> ” “</span>;<span style="color: #ff0000;">clear</span>:<span style="color: #0000ff;">both</span>;<span style="color: #ff0000;">height</span>:<span style="color: #0000ff;">0</span>;}<span style="color: #800000;"> .clearfix</span>{<span style="color: #ff0000;">*zoom</span>:<span style="color: #0000ff;">1</span>;}
Method: If the child node is set to float, add the clearfix class to its parent node to achieve the clearing effect
Reference: http://blog.sina.com.cn/s/blog_60b35e830101c1r8.html