CSS Float

float is one of the most interesting and often-used CSS properties. It takes a
value of left, right, or none (though none, the default, is rarely used). float
forces the element to which it’s applied to display outside its natural position in
the containing box; a float value of left or right pushes the element to the
left or the right of its natural position, respectively. This property can be used
within any block element.

Note: When using the float property on elements that don’t have well-defined
dimensions, you must include a width declaration in your CSS.

原文地址:https://www.cnblogs.com/dragonstreak_1/p/2613026.html