基于来自 Bootstrap网站的示例代码片段,我构建了以下代码以显示两个水平对齐的缩略图:
<div class="row">
<div class="col-sm-6 col-md-3 col-lg-3">
<div class="thumbnail">
<img data-src="holder.js/300x200" alt="...">
<div class="caption">
<h3>Thumbnail label</h3>
<p>Filter mode</p>
<p><a href="#" class="btn btn-primary">Button</a> <a href="#" class="btn btn-default">Button</a></p>
</div>
</div>
<div class="thumbnail">
<img data-src="holder.js/300x200" alt="...">
<div class="caption">
<h3>Thumbnail label</h3>
<p>Filter mode</p>
<p><a href="#" class="btn btn-primary">Button</a> <a href="#" class="btn btn-default">Button</a></p>
</div>
</div>
</div>
</div>
但是,它们不是水平对齐,而是垂直堆叠,如下所示:
如何使缩略图水平对齐,如此处的代码示例所示?