目录
表格
bootstrap中与html5中的表格创建方式相同,但是对于有些标签效果有所不同,我们可以看看下面这段代码,分别在html5和bootstrap4中运作,看看区别:
<table>
<caption>表格</caption>
<thead>
<tr>
<th>表头1</th>
<th>表头1</th>
</tr>
</thead>
<tbody>
<tr>
<td>表格单元1</td>
<td>表格单元1</td>
</tr>
<tr>
<td>表格单元3</td>
<td>表格单元4</td>
</tr>
</tbody>
</table>
bootstrap4和html5渲染效果:
我们可以发现,在bootstrap中表头<th>内的元素内容不具有自动居中效果,并且html5中用与定义表格标题的<captain>标签在bootstrap中效果也不同。在bootstrap中,<captain>标签作用是描述或者总结表格存储内容,而并非定义表格标题,因此在使