Twitter bootstrap 引导表<;td>;宽度似乎各不相同
我有三个标准引导4表到位。然而,这三种情况下的td宽度并不一致 我不知道我的结构中是否缺少一个实用程序,可以使宽度标准化。我原以为这可能与Bootstrap4中的Flex功能有关,但我添加的任何内容似乎都不会对我的标记产生影响 这是否与我向每个元素写入的文本量有关Twitter bootstrap 引导表<;td>;宽度似乎各不相同,twitter-bootstrap,html-table,width,Twitter Bootstrap,Html Table,Width,我有三个标准引导4表到位。然而,这三种情况下的td宽度并不一致 我不知道我的结构中是否缺少一个实用程序,可以使宽度标准化。我原以为这可能与Bootstrap4中的Flex功能有关,但我添加的任何内容似乎都不会对我的标记产生影响 这是否与我向每个元素写入的文本量有关 <div class="row pt-2 pb-4"> <table class="table pb-5"> <thead class="border-0">
<div class="row pt-2 pb-4">
<table class="table pb-5">
<thead class="border-0">
<tr>
<th class="border-top-none typeface-montserrat-500" scope="col">Content here with text</th>
<th class="border-top-none" scope="col"></th>
<th class="border-top-none" scope="col"></th>
</tr>
</thead>
<tbody>
<tr>
<td>Content here</td>
<td class="color-grey-dark">Content here</td>
<td><a href="" class="btn btn-blue-light float-right px-4 py-1">Content here</a></td>
</tr>
</tbody>
</table>
</div>
<div class="row pt-2 pb-4">
<table class="table pb-5">
<thead class="border-0">
<tr>
<th class="border-top-none typeface-montserrat-500" scope="col">Content here with text</th>
<th class="border-top-none" scope="col"></th>
<th class="border-top-none" scope="col"></th>
</tr>
</thead>
<tbody>
<tr>
<td>Content here</td>
<td class="color-grey-dark">Content here</td>
<td><a href="" class="btn btn-blue-light float-right px-4 py-1">Content here</a></td>
</tr>
<tr>
<td>Content with more text here</td>
<td class="color-grey-dark">Content here</td>
<td><a href="" class="btn btn-blue-light float-right px-4 py-1">Content here</a></td>
</tr>
<tr>
<td>Content with more text here</td>
<td class="color-grey-dark">Content here</td>
<td><a href="" class="btn btn-blue-light float-right px-4 py-1">Content here</a></td>
</tr>
<tr>
<td>Content here</td>
<td class="color-grey-dark">Content here</td>
<td><a href="" class="btn btn-blue-light float-right px-4 py-1">Content here</a></td>
</tr>
</tbody>
</table>
</div>
<div class="row pt-2 pb-4">
<table class="table pb-5">
<thead class="border-0">
<tr>
<th class="border-top-none typeface-montserrat-500" scope="col">Content here with some different text again</th>
<th class="border-top-none" scope="col"></th>
<th class="border-top-none" scope="col"></th>
</tr>
</thead>
<tbody>
<tr>
<td>Content here</td>
<td class="color-grey-dark">Content here once more</td>
<td><a href="" class="btn btn-blue-light float-right px-4 py-1">Content here</a></td>
</tr>
<tr>
<td>Content with more text here</td>
<td class="color-grey-dark">Content here</td>
<td><a href="" class="btn btn-blue-light float-right px-4 py-1">Content here</a></td>
</tr>
<tr>
<td>Content with more text here</td>
<td class="color-grey-dark">Content here with even more text</td>
<td><a href="" class="btn btn-blue-light float-right px-4 py-1">Content here</a></td>
</tr>
<tr>
<td>Content here</td>
<td class="color-grey-dark">Content here</td>
<td><a href="" class="btn btn-blue-light float-right px-4 py-1">Content here</a></td>
</tr>
</tbody>
</table>
</div>
内容在这里与文字
满足于此
满足于此
内容在这里与文字
满足于此
满足于此
这里有更多的内容
满足于此
这里有更多的内容
满足于此
满足于此
满足于此
这里的内容与一些不同的文本再次
满足于此
内容再次出现在这里
这里有更多的内容
满足于此
这里有更多的内容
这里的内容包含更多的文本
满足于此
满足于此
这是过去其他引导表的一个问题。添加到每个
标记时,添加style=“width:33.3333%”
似乎可以起到作用。它将标准化表列的宽度
使用此资源帮助回答您的其他问题:
内容在这里与文字
满足于此
满足于此
内容在这里与文字
满足于此
满足于此
这里有更多的内容
满足于此
这里有更多的内容
满足于此
满足于此
满足于此
这里的内容与一些不同的文本再次
满足于此
内容再次出现在这里
这里有更多的内容
满足于此
这里有更多的内容
这里的内容包含更多的文本
满足于此
满足于此
非常感谢您的反馈。我们最终完全删除了这些表,因为它们在任何情况下都不能完全响应特定的屏幕宽度,因此无法达到我们需要它们的目的。
<div class="row pt-2 pb-4">
<table class="table pb-5">
<thead class="border-0">
<tr>
<th style="width: 33.3333%" class="border-top-none typeface-montserrat-500" scope="col">Content here with text</th>
<th style="width: 33.3333%" class="border-top-none" scope="col"></th>
<th style="width: 33.3333%" class="border-top-none" scope="col"></th>
</tr>
</thead>
<tbody>
<tr>
<td>Content here</td>
<td class="color-grey-dark">Content here</td>
<td><a href="" class="btn btn-blue-light float-right px-4 py-1">Content here</a></td>
</tr>
</tbody>
</table>
</div>
<div class="row pt-2 pb-4">
<table class="table pb-5">
<thead class="border-0">
<tr>
<th style="width: 33.3333%" class="border-top-none typeface-montserrat-500" scope="col">Content here with text</th>
<th style="width: 33.3333%" class="border-top-none" scope="col"></th>
<th style="width: 33.3333%" class="border-top-none" scope="col"></th>
</tr>
</thead>
<tbody>
<tr>
<td>Content here</td>
<td class="color-grey-dark">Content here</td>
<td><a href="" class="btn btn-blue-light float-right px-4 py-1">Content here</a></td>
</tr>
<tr>
<td>Content with more text here</td>
<td class="color-grey-dark">Content here</td>
<td><a href="" class="btn btn-blue-light float-right px-4 py-1">Content here</a></td>
</tr>
<tr>
<td>Content with more text here</td>
<td class="color-grey-dark">Content here</td>
<td><a href="" class="btn btn-blue-light float-right px-4 py-1">Content here</a></td>
</tr>
<tr>
<td>Content here</td>
<td class="color-grey-dark">Content here</td>
<td><a href="" class="btn btn-blue-light float-right px-4 py-1">Content here</a></td>
</tr>
</tbody>
</table>
</div>
<div class="row pt-2 pb-4">
<table class="table pb-5">
<thead class="border-0">
<tr>
<th style="width: 33.3333%" class="border-top-none typeface-montserrat-500" scope="col">Content here with some different text again</th>
<th style="width: 33.3333%" class="border-top-none" scope="col"></th>
<th style="width: 33.3333%" class="border-top-none" scope="col"></th>
</tr>
</thead>
<tbody>
<tr>
<td>Content here</td>
<td class="color-grey-dark">Content here once more</td>
<td><a href="" class="btn btn-blue-light float-right px-4 py-1">Content here</a></td>
</tr>
<tr>
<td>Content with more text here</td>
<td class="color-grey-dark">Content here</td>
<td><a href="" class="btn btn-blue-light float-right px-4 py-1">Content here</a></td>
</tr>
<tr>
<td>Content with more text here</td>
<td class="color-grey-dark">Content here with even more text</td>
<td><a href="" class="btn btn-blue-light float-right px-4 py-1">Content here</a></td>
</tr>
<tr>
<td>Content here</td>
<td class="color-grey-dark">Content here</td>
<td><a href="" class="btn btn-blue-light float-right px-4 py-1">Content here</a></td>
</tr>
</tbody>
</table>
</div>