0
我有這樣的HTML行:如何在一行中製作HTML元素?
<table class="table table-responsive table-hover">
<thead>
<tr>
<th>Type Object</th>
<th style="width: 100px;text-align: left">
<a class="btn btn-primary btn-sm">
<i class="glyphicon glyphicon-plus"></i>
</a>
</th>
</tr>
</thead>
<tbody ng-repeat="object in objects track by object.Id">
<tr>
<td ng-bind="object.Name"></td>
<td>
<a class="btn btn-default btn-xs" ng-click="object.showPhoto = !object.showPhoto; $event.stopPropagation();"><i class="glyphicon glyphicon-camera"></i></a>
<a class="btn btn-default btn-xs" ui-sref="objects.view({regionId:region.Id, objectId:object.Id})" ng-click="$event.stopPropagation();"><i class="glyphicon glyphicon-info-sign"></i></a>
<a class="btn btn-default btn-xs" ng-click="zoomObject(object); $event.stopPropagation();"><i class="glyphicon glyphicon-screenshot"></i></a>
<a class="btn btn-default btn-xs" ng-click="object.showReview = object.showReview;"><i class="glyphicon glyphicon-list-alt"></i></a>
</td>
</tr>
<tr ng-if="object.showPhoto">
<td colspan="2"><img ng-src="{{getPhotoUrl(object)}}" style="max-width: 100%;" alt="Image Object" /></td>
</tr>
<tr ng-if="object.showReview">
<td colspan="2">nnn!!!</td>
<list-of-insp></list-of-insp>
</tr>
</tbody>
</table>
這是如何的長相鑑於:
我的問題是如何讓所有元素在一排?
你嘗試在下面的代碼行增加寬度在第一列中的至少大小的最小寬度將它們包裝在一個元件/格? '
回答
將其更改爲200px之類的東西。
第二件事 - 你的表沒有響應,在Bootstrap中你必須在類的表響應中在表的上方創建另一個div。
來源
2015-10-16 21:31:24 makshh
很好的答案。 :) – CodeLyfe
浮法左每個元素,並與所有4個元件
來源
2015-10-16 21:36:38 jmancherje
相關問題