我使用bootstrap缩略图类来显示如下图所示的玩家列表。问题是一些玩家的名字超过了一行,而第二行的缩略图没有相同的维度。我遇到的真正问题是照片中第二行所示缩略图的错误位置。我该如何解决它?下面是代码:Bootstrap缩略图位置
<div class="row">
<div ng-repeat="player in $ctrl.players">
<div class="col-sm-4 col-md-3">
<div class="thumbnail">
<img ng-src="{{player.imgpath}}" height="100" width="121" alt="" style="border-radius: 100%"/>
<div class="caption">
<h4><span class="badge">{{player.jersey}}</span> {{player.name}}</h4>
<table class="table">
<tr>
<td><b>Position</b></td>
<td>{{player.position}}</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
对于名称,你可以给缩略图特定的高度。使用'white-space:nowrap'可能会使名称超出缩略图的边界,因为它可以防止换行符。但是对于错误的定位,这可能是您的脚本存在的问题。 –
这是经典的Bootstrap [高度问题](https://medium.com/wdstack/varying-column-heights-in-bootstrap-4e8dd5338643)。另见http://stackoverflow.com/questions/22310912/bootstrap-rows-with-columns-of-different-height和http://stackoverflow.com/questions/38730889/bootstrap-grid-system-new-line-不要看起来不错/ 38745719 – ZimSystem