第1个回答 推荐于2017-09-12
把两个div
float:left;
然后两个Div就会横向排列,要是想排两个就换行,可以在两个div的外面包一个大的Div,宽度设为两个div宽度的总和,超过两个就自动换行本回答被提问者和网友采纳
第2个回答 2015-01-22
.div-inline{ display:inline}
<div class="div-inline">第一个div盒子</div>
<div class="div-inline">第二个盒子</div>
<div class="div-inline">第三个盒子</div>
第3个回答 2015-10-21
<div width="100%">
<div style="float:left;width:50%"></div>
<div style="float:right;width:50%"></div>
<div style="clear:both"></div>
</div>