相关疑难解决方法(0)

表列大小

Bootstrap 3,我可以随意应用和调整表格列中col-sm-xxth标签thead.但是这在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>
Run Code Online (Sandbox Code Playgroud)

查看codeply,前提是它的大小不正确,特别是如果向表中添加一些数据.看看它是如何运行的:

<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>
Run Code Online (Sandbox Code Playgroud)

css html-table twitter-bootstrap bootstrap-4

73
推荐指数
6
解决办法
12万
查看次数

标签 统计

bootstrap-4 ×1

css ×1

html-table ×1

twitter-bootstrap ×1