在Bootstrap 3
中,我可以将col-sm-xx
应用于thead
列中的th
个标记,并随意调整表列的大小.但是,这在Bootstrap 4中不起作用,我如何在Bootstrap 4中实现这样的功能呢?
<thead>
<th class="col-sm-3">3 columns wide</th>
<th class="col-sm-5">5 columns wide</th>
<th class="col-sm-4">4 columns wide</th>
</thead>
如果代码的大小不正确,请查看代码,特别是在向表中添加一些数据的情况下.请查看此命令的运行方式:
<div class="container" style="border: 1px solid black;">
<table class="table table-bordered">
<thead>
<tr class="row">
<th class="col-sm-3">3 columns wide</th>
<th class="col-sm-5">5 columns wide</th>
<th class="col-sm-4">4 columns wide</th>
</tr>
</thead>
<tbody>
<tr>
<td>123</td>
<td>456</td>
<td>789</td>
</tr>
</tbody>
</table>
</div>