Bootstrap 4.5 table TR 后接 TH
Bootstrap 4.5 table TR followed by a TH
我想知道为什么 bootstrap 4.5 像这样(官方 Bootstrap 站点)在元素后面放一个右边,为什么 scope="row
表示?
<table class="table">
<thead class="thead-dark">
<tr>
<th scope="col">#</th>
<th scope="col">First</th>
<th scope="col">Last</th>
<th scope="col">Handle</th>
</tr>
</thead>
<tbody>
<tr>
**<th scope="row">1</th>**
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
**<th scope="row">2</th>**
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
**<th scope="row">3</th>**
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
谢谢。
第一个范围不是 "bootstrap thing"。它指定 header 单元格是否是列、行或列或行组的 header。
回答你关于 scope=row 的问题,它表明这个 th 将是你正在写的行的 header。
您可以在此处找到更多信息:HTML th scope Attribute
我想知道为什么 bootstrap 4.5 像这样(官方 Bootstrap 站点)在元素后面放一个右边,为什么 scope="row
表示?
<table class="table">
<thead class="thead-dark">
<tr>
<th scope="col">#</th>
<th scope="col">First</th>
<th scope="col">Last</th>
<th scope="col">Handle</th>
</tr>
</thead>
<tbody>
<tr>
**<th scope="row">1</th>**
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
**<th scope="row">2</th>**
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
**<th scope="row">3</th>**
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
谢谢。
第一个范围不是 "bootstrap thing"。它指定 header 单元格是否是列、行或列或行组的 header。 回答你关于 scope=row 的问题,它表明这个 th 将是你正在写的行的 header。 您可以在此处找到更多信息:HTML th scope Attribute