gpt4 book ai didi

html - Bootstrap 缩略图未正确堆叠

转载 作者:可可西里 更新时间:2023-11-01 12:50:33 25 4
gpt4 key购买 nike

我的 bootstrap 缩略图有不同的高度,我认为这个问题可能导致它们无法正确堆叠(参见屏幕截图和 fiddle )。我想我需要为它们添加一个最小高度,但我无法让它正常工作..任何人都可以伸出援手吗?

这是我的代码:

<body>
<div class="container-fluid">
<div class="hidden-phone">
<a href="newBook.php">
<button class="btn btn-large btn-primary" style="float:right; margin-top:30px;" type="button">Add Book</button>
</a>
</div>
<div class="row-fluid">
<div class="span12 well">

<div class="row-fluid">
<ul class="thumbnails">

<li class="span4">
<div class="thumbnail">
<img src="http://placehold.it/320x200" alt="ALT NAME">
<div class="caption">
<h3>Title</h3>

<p>Seller: Me</p>
<p>Email: </p>
<p>Cost: </p>
<p>Condition: </p>
<p align="center">
<a href="#myModal" class="btn btn-primary btn-block" data-toggle="modal">View More information</a>
</p>
</div>
</div>
</li>
<li class="span4">
<div class="thumbnail">
<img src="http://placehold.it/320x200" alt="ALT NAME">
<div class="caption">
<h3>Title</h3>
<span class="label label-warning" style="margin-bottom: 10px;">Book has been sold!</span>
<p>Seller: Me</p>
<p>Email: </p>
<p>Cost: </p>
<p>Condition: </p>
<p align="center">
<a href="#myModal" class="btn btn-primary btn-block" data-toggle="modal">View More information</a>
</p>
</div>
</div>
</li>
<li class="span4">
<div class="thumbnail">
<img src="http://placehold.it/320x200" alt="ALT NAME">
<div class="caption">
<h3>Title</h3>

<p>Seller: Me</p>
<p>Email: </p>
<p>Cost: </p>
<p>Condition: </p>
<p align="center">
<a href="#myModal" class="btn btn-primary btn-block" data-toggle="modal">View More information</a>
</p>
</div>
</div>
</li>

<li class="span4">
<div class="thumbnail">
<img src="http://placehold.it/320x200" alt="ALT NAME">
<div class="caption">
<h3>Title</h3>

<p>Seller: Me</p>
<p>Email: </p>
<p>Cost: </p>
<p>Condition: </p>
<p align="center">
<a href="#myModal" class="btn btn-primary btn-block" data-toggle="modal">View More information</a>
</p>
</div>
</div>
</li>
<li class="span4">
<div class="thumbnail">
<img src="http://placehold.it/320x200" alt="ALT NAME">
<div class="caption">
<h3>Title</h3>

<p>Seller: Me</p>
<p>Email: </p>
<p>Cost: </p>
<p>Condition: </p>
<p align="center">
<a href="#myModal" class="btn btn-primary btn-block" data-toggle="modal">View More information</a>
</p>
</div>
</div>
</li>

</ul>
</div>
</div>
</div>
</div>

</body>

fiddle :http://jsfiddle.net/Z3VwZ/

屏幕: enter image description here enter image description here

最佳答案

不,div 的高度不是问题。问题是您只能将三个带有 .span4 类的 div 放在一个带有 .row-fluid 类的 div 中。如果您想要更多带有 .span4 的 div,您必须使用 .row-fluid 类创建新的 div,并将这些新的 .span4 div 放入其中。 See Twitter bootstrap official documentation .

例如,这是有效的 Twitter Bootstrap 标记

<div class="row-fluid">
<div class="span4"></div>
<div class="span4"></div>
<div class="span4"></div>
</div>

<div class="row-fluid">
<div class="span4"></div>
<div class="span4"></div>
<div class="span4"></div>
</div>

<div class="row-fluid">
<div class="span12"></div>
</div>

<div class="row-fluid">
<div class="span8"></div>
<div class="span1"></div>
<div class="span3"></div>
</div>

这是使用您的代码的工作演示 >>> http://jsfiddle.net/Z3VwZ/1/

关于html - Bootstrap 缩略图未正确堆叠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15869169/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com