gpt4 book ai didi

html - 引导表溢出

转载 作者:太空宇宙 更新时间:2023-11-04 08:20:46 27 4
gpt4 key购买 nike

我有两张并排的 table 。我有引导网格系统,并且能够让表格变得动态并且看起来很漂亮。我的问题是当我动态添加一个冗长的字符串时,表中文本的溢出将表推到第二个表中。所以它不是很敏感。当我不超过某个字符数时,它似乎效果很好。这是引导表网格的规则吗?

Overlapped Table

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

<div class="container">
<div class="col-sm-6">
<h2 class="sub-header">TITLE</h2>
<div class="table-responsive">
<table class="table table-striped ">
<thead>
<tr>
<th class="col-md-1">Subject</th>
<th class="col-md-2">Comments</th>
<th class="col-md-3">Owner</th>
<th class="col-md-3">Really Long Header that will case the table to overflow</th>
<th class="col-md-3">Date Activity Logged</th>
</tr>
</thead>
<tbody>
<tr>
<td class="col-md-1">1,001</td>
<td class="col-md-2">1,001</td>
<td class="col-md-3">1,001</td>
<td class="col-md-4">1,001</td>
<td class="col-md-5">1,001</td>
</tr>
<tr>
<td class="col-md-1">1,001</td>
<td class="col-md-2">1,001</td>
<td class="col-md-3">1,001</td>
<td class="col-md-4">1,001</td>
<td class="col-md-5">1,001</td>
</tr>
<tr>
<td class="col-md-1">1,001</td>
<td class="col-md-2">1,001</td>
<td class="col-md-3">1,001</td>
<td class="col-md-4">1,001</td>
<td class="col-md-5">1,001111111111111111111111111111</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-sm-6">
<h2 class="sub-header">Title Two For Table Two</h2>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th class="col-md-1">#</th>
<th class="col-md-2">Header</th>
<th class="col-md-3">Header</th>
</tr>
</thead>
<tbody>
<tr>
<td class="col-md-1">1,001</td>
<td class="col-md-2">1,001</td>
<td class="col-md-3">1,001</td>
</tr>
<tr>
<td class="col-md-1">1,001</td>
<td class="col-md-2">1,001</td>
<td class="col-md-3">1,001</td>
</tr>
<tr>
<td class="col-md-1">1,001</td>
<td class="col-md-2">1,001</td>
<td class="col-md-3">1,001</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

最佳答案

我刚刚意识到 td's 有一个列大小。一旦我从表中的 td 中删除了 "col-md-2",bootstrap 就会响应。

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">


<div class="container">
<div class="col-sm-6">
<h2 class="sub-header">TITLE</h2>
<div class="table-responsive">
<table class="table table-striped ">
<thead>
<tr>
<th>Subject</th>
<th>Comments</th>
<th>Owner</th>
<th>Really Long Header</th>
<th>Date Activity Logged</th>
</tr>
</thead>
<tbody>
<tr>
<td>1,001</td>
<td>1,001</td>
<td>1,001</td>
<td>1,001</td>
<td>1,001</td>
</tr>
<tr>
<td>1,001</td>
<td>1,001</td>
<td>1,001</td>
<td>1,001</td>
<td>1,001</td>
</tr>
<tr>
<td>1,001</td>
<td>1,001</td>
<td>1,001</td>
<td>1,001</td>
<td>1,001</td>
</tr>
</tbody>
</table>
</div>
</div>


<div class="col-sm-6">
<h2 class="sub-header">Title Two For Table Two</h2>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Comment</th>
<th>Created By</th>
<th>Case/Merchant Number</th>
<th>Created Time</th>
</tr>
</thead>
<tbody>
<tr>
<td>1,001</td>
<td>1,001</td>
<td>1,001</td>
<td>1,001</td>
</tr>
<tr>
<td>1,001</td>
<td>1,001</td>
<td>1,001</td>
<td>1,001</td>
</tr>
<tr>
<td>1,001</td>
<td>1,001</td>
<td>1,001</td>
<td>1,001</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

关于html - 引导表溢出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45553675/

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