gpt4 book ai didi

bootstrap-4 - 基于表格内容的列自动宽度

转载 作者:行者123 更新时间:2023-12-04 13:46:06 24 4
gpt4 key购买 nike

我可以在表(或类似的东西)中使用 col-{breakpoint}-auto 吗?

Using the col-{breakpoint}-auto classes, columns can size itself based on the natural width of its content.

最佳答案

您也可以在

.col-auto

md .col-auto width: 100%;

.col-auto form fields

<table class="table">
<thead>
<tr>
<th scope="col" class="col-auto">#</th>
<th scope="col" class="col-md-auto">First</th>
<th scope="col" class="col-md-auto">Last</th>
<th scope="col" class="col-md-auto">Handle</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<th scope="row">3</th>
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" rel="stylesheet"/>

关于bootstrap-4 - 基于表格内容的列自动宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48029040/

中使用它们,但据我所知 是表列的默认行为。看看下面的例子。当全屏查看时(在 断点上方),所有列都表现为 .但是,在断点下方,具有指定宽度的第一列(示例中的第二列,带有 )占用了其他列的所有可用空间。此外,作为另一个使用示例,Bootstrap 文档提到 在 的上下文中以及。

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