<分区>
<分区>
如何使用bootstarp和float实现如下布局。目前我正在使用 float left 和 clear:none 但一些 div 没有向上移动。还有一个空间被遗漏了。此类 div 的数量和高度是动态的。
最佳答案
这里有一个关于如何使用 bootstrap css 获取两列的小示例。您可能应该阅读更多 here
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row">
<div class="col-xs-6">
<h1>1st column</h1>
</div>
<div class="col-xs-6">
<h1>2nd column</h1>
</div>
</div>
</div>
关于css - 使用 float 和 bootstrap 的 2 列布局,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39594471/