我使用 Twitter Bootstrap 作为我的应用程序的框架,并使用缩略图来显示有关不同产品的信息(6 个分为两行)。但是,缩略图是左对齐的,我无法让它们居中。那怎么可能呢?
html:
<div class="row span12">
<ul class="thumbnails span12">
<li class="span3 product">
<div class="thumbnail padding pagination-centered">
Product 1
</div>
</li>
<li class="span3 product">
<div class="thumbnail padding pagination-centered">
Product 2
</div>
</li>
<li class="span3 product">
<div class="thumbnail padding pagination-centered">
Product 3
</div>
</li>
<li class="span3 product">
<div class="thumbnail padding pagination-centered">
Product 4
</div>
</li>
<li class="span3 product">
<div class="thumbnail padding pagination-centered">
Product 5
</div>
</li>
<li class="span3 product">
<div class="thumbnail padding pagination-centered">
Product 6
</div>
</li>
</ul>
</div>
输出:
_____________________
| |
| Products |
| ___ ___ ___ |
|| | | | | | |
||___| |___| |___| |
| ___ ___ ___ |
|| | | | | | |
||___| |___| |___| |
| |
|_____________________|
期望的输出:
_____________________
| |
| Products |
| ___ ___ ___ |
| | | | | | | |
| |___| |___| |___| |
| ___ ___ ___ |
| | | | | | | |
| |___| |___| |___| |
| |
|_____________________|