我碰巧看到一个div有风格的clear:both!clearin有style什么用?
div
clear:both
clear
style
<div style="clear:both">
clear:both 使元素下降到文档中位于其之前的所有浮动元素之下。
您也可以使用clear:left或clear:right使其仅落在向左或向右浮动的那些元素下方。
clear:left
clear:right
+------------+ +--------------------+ | | | | | float:left | | without clear | | | | | | | +--------------------+ | | +--------------------+ | | | | | | | with clear:right | | | | (no effect here, | | | | as there is no | | | | float:right | | | | element) | | | | | | | +--------------------+ | | +------------+ +---------------------+ | | | with clear:left | | or clear:both | | | +---------------------+