【发布时间】:2013-06-22 05:27:43
【问题描述】:
我试图让我的缩略图在一行内均匀分布。他们每个人都是一个span2,有一个240x240的图像,行是span12。所以当我有 6 个时,它看起来很完美。当我有 5 个时,它只会将最后 2 个跨度留空。我应该怎么做才能自动均匀地间隔 span2 缩略图,以便它占据整个行,并且它们之间的间距相等?
添加代码:
<div class="row-fluid">
<ul class="thumbnails">
<li class="span2">
<a href="#edithotelModal" class="thumbnail" data-toggle="modal">
<img src="http://placehold.it/240x240" alt="">
<h3>Room 1</h3>
<p> <%= Forgery(:lorem_ipsum).words(20) %></p>
</a>
</li>
<li class="span2">
<a href="#editroomtypeModal" class="thumbnail" data-toggle="modal">
<img src="http://placehold.it/240x240" alt="">
<h3>Room 2</h3>
<p> <%= Forgery(:lorem_ipsum).words(20) %></p>
</a>
</li>
<li class="span2">
<a href="#editroomModal" class="thumbnail" data-toggle="modal">
<img src="http://placehold.it/240x240" alt="">
<h3>Room 3</h3>
<p> <%= Forgery(:lorem_ipsum).words(20) %></p>
</a>
</li>
<li class="span2">
<a href="#managepricesModal" class="thumbnail" data-toggle="modal">
<img src="http://placehold.it/240x240" alt="">
<h3>Room 4</h3>
<p> <%= Forgery(:lorem_ipsum).words(20) %></p>
</a>
</li>
<li class="span2">
<a href="#manageextrasModal" class="thumbnail" data-toggle="modal">
<img src="http://placehold.it/240x240" alt="">
<h3>Room 5</h3>
<p> <%= Forgery(:lorem_ipsum).words(20) %></p>
</a>
</li>
</ul>
</div>
【问题讨论】:
-
只是一个快速的猜测:如果你有一行,我认为你不需要 span12 - 只有当你想创建一个特殊的容器时。但是你能发布你的(部分)代码吗?
标签: twitter-bootstrap thumbnails fluid-layout