Twitter bootstrap 一行内的引导流体缩略图
我试着让我的缩略图在一行内均匀分布。它们每个都是一个span2,带有一个240x240图像,行是span12。所以当我有6个时,它看起来很完美。当我有5个跨距时,只剩下最后2个跨距为空。我应该怎么做才能使它自动均匀地隔开span2缩略图,以便它以相等的间距占据整行 新增代码:Twitter bootstrap 一行内的引导流体缩略图,twitter-bootstrap,thumbnails,fluid-layout,Twitter Bootstrap,Thumbnails,Fluid Layout,我试着让我的缩略图在一行内均匀分布。它们每个都是一个span2,带有一个240x240图像,行是span12。所以当我有6个时,它看起来很完美。当我有5个跨距时,只剩下最后2个跨距为空。我应该怎么做才能使它自动均匀地隔开span2缩略图,以便它以相等的间距占据整行 新增代码: <div class="row-fluid"> <ul class="thumbnails"> <li class="span2"> <a href=
<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>
-
-
-
-
-
如果只使用“标准”引导,我认为这是不可能的,因为不同的跨距有自己的值
您可以创建自己的类,以满足特殊需要,但您必须计算百分比
也许这是一本好书:
还有一个:
您还可以使用javascript计算包含元素的宽度,并将其均匀地分布到您的元素中——但您必须记住边距 只是一个简单的猜测:如果你有一行,我认为你不需要span12——只有当你想创建一个特殊的容器时。但是你能发布你的(部分)代码吗?糟糕,好吧,我会看看,看看我能想出什么。
.my-span5 {
width: // Should be 20% minus a few something
margin-left: // do the calculations...
}