2. The multiple elements to the same line? There are several ways to clear float? [HTML]

1. The plurality of elements disposed the same row: float, inline-block
Clear float ways:
Method One: Add a new element, use clear: both;
Method two: parent div defined overflow: hidden;
Method three: the use of: after and: before inserting the element within the two blocks of elements, remove from the surface to achieve the effect of floating.
.clear{zoom:1;}
.clear:after{content:””;clear:both;display:block;height:0;overflow:hidden;visibility:hidden;}

Guess you like

Origin www.cnblogs.com/Caixingmin/p/11249663.html