Home > Article > Web Front-end > html div 制作表格_html/css_WEB-ITnose
要的效果
为什么最后一个div不换行。怎么清空浮动的样式
<div> <div style=" background-color:#F00;"> <div style="width:200px; height:100px; border:1px solid black; float:left"></div> <div style="width:200px; height:100px; border:1px solid black; float:left"></div> <div style="width:200px; height:100px; border:1px solid black; float:left"></div> </div> <div style="clear:left;" > <div style="width:200px; height:100px; border:1px solid black; float:left;"></div> <div style="width:200px; height:100px; border:1px solid black; float:left"></div> <div style="width:200px; height:100px; border:1px solid black; float:left"></div> </div> <div style="height:100px;"> </div></div>
clear: both;清除float