Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 使用bootstrap将表标题置于底部_Html_Twitter Bootstrap 4 - Fatal编程技术网

Html 使用bootstrap将表标题置于底部

Html 使用bootstrap将表标题置于底部,html,twitter-bootstrap-4,Html,Twitter Bootstrap 4,表标题位于表的顶部,但当我使用引导类时,它会位于表的底部 <table class="table table-bordered"> <caption>why?</caption> <tr> <th>1</th> <th>2</th> <th>3</th> </tr> <tr>

表标题位于表的顶部,但当我使用引导类时,它会位于表的底部

<table class="table table-bordered">
    <caption>why?</caption>
    <tr>
        <th>1</th>
        <th>2</th>
        <th>3</th>
    </tr>
    <tr>
        <th>4</th>
        <td>5</td>
        <td>6</td>
    </tr>
</table>

为什么?
1.
2.
3.
4.
5.
6.

如何将其与表的顶部对齐?

这是因为bootstrap 4具有默认的标题css样式-
标题侧:底部


更改
标题侧时:顶部您将在表格顶部显示标题

关于如何更改空表的标题位置,您有什么想法吗?我注意到,当我的表格为空时,标题显示在表格的顶部而不是底部。您是否尝试了标题侧:底部而不是标题侧:顶部?你应该给我你到目前为止尝试了什么,我猜不出没有你的一些代码有一个引导类名吗?引导没有特殊的类名,你可以简单地使用
这需要为
标题
标记声明;总的来说,它是:
caption{caption side:top;}
与v4.3.1相同的问题