gpt4 book ai didi

css - 无法修复 Bootstrap 中的列宽

转载 作者:太空宇宙 更新时间:2023-11-04 12:36:50 25 4
gpt4 key购买 nike

我正在尝试修复列的宽度(名称:链接)但无法在下面执行此操作是我的代码

<table class="table table-striped table-bordered">
<thead>
<th>ID</th>
<th>User</th>
**<th class="col-sm-2">Link</th>**
<th>Charge</th>
<th>Start count</th>
<th>Quantity</th>
<th>Type</th>
<th>Status</th>
<th>Date</th>

但是表的输出没有变化,你能告诉我我做错了什么吗?

最佳答案

您的 html 没有关闭 theadtable,但是当您正确设置 html 格式时,列类会起作用。许多人使用 table 上的类(class)。

.col-sm-2 从 min-width:768px 开始,它是父级(表格)宽度的 16.6666666666667%。它将保持该最小宽度的 16.6666666666667% 及以上,并将恢复为默认宽度。

演示:https://jsbin.com/mupeve

<table class="table table-striped table-bordered">
<thead>
<th>ID</th>
<th>User</th>
<th class="col-sm-2">Link</th>
<th>Charge</th>
<th>Start count</th>
<th>Quantity</th>
<th>Type</th>
<th>Status</th>
<th>Date</th>
</thead>
</table>

关于css - 无法修复 Bootstrap 中的列宽,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27216621/

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