如果想让文字在浮动的下面另起一行显示,就要在本标签用clear:both;清除浮动
例如
<div style="float:left">我是左浮动</div>
<div style="clear:both;margin-top:20px">我要清除浮动</div>
如果此处没有clear:both清除浮动,则margin-top:20px没有效果
如果想让文字在浮动的下面另起一行显示,就要在本标签用clear:both;清除浮动
例如
<div style="float:left">我是左浮动</div>
<div style="clear:both;margin-top:20px">我要清除浮动</div>
如果此处没有clear:both清除浮动,则margin-top:20px没有效果