[英]adjust main container width according to table width
是否可以..如果桌子的寬度增加了,那么它的主容器寬度就會相應地增加。 可能嗎 ??
<div class="container main-con">
<table class="table table-hover"> <tr><td></td></tr>
</table>
</div>
如果表中的數據增加,則表在容器外部。 所以可以根據桌子的寬度增加主容器的寬度
具有比屏幕寬的容器幾乎總是很糟糕的用戶體驗。 人們(有充分的理由)不喜歡左右滾動。 相反,最好只使表向左/向右滾動。
通過使表具有響應性,您應該能夠輕松實現此目標。 從Bootstrap文檔 :
通過將任何.table包裝在.table-response中以使其水平滾動來創建響應表
例如:
<div class="table-responsive">
<table class="table table-hover">
<tr>
<td></td>
</tr>
</table>
</div>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.