Dha*_*ude 20 html html-table twitter-bootstrap
众所周知,当您使用Twitter Bootstrap获取表格时,您会得到如下结果:

是否有可能删除表格的第一行,即"Abos Girolamo"上面的那一行?谢谢
更新:这是表的代码:
<table class="table table-no-border">
<tbody>
<tr>
<td>Abos Girolamo</td>
</tr>
<tr>
<td>Aboulker Isabelle</td>
</tr>
<tr>
<td>Adam Adolphe</td>
</tr>
</tbody>
</table>
Run Code Online (Sandbox Code Playgroud)
adr*_*ift 30
.table > tbody > tr:first-child > td {
border: none;
}
Run Code Online (Sandbox Code Playgroud)
@import url('http://getbootstrap.com/dist/css/bootstrap.css');
table {
margin-top: 50px;
}
.table > thead > tr:first-child > td,
.table > tbody > tr:first-child > td {
border: none;
}Run Code Online (Sandbox Code Playgroud)
<table class="table table-no-border">
<tbody>
<tr>
<td>Abos Girolamo</td>
</tr>
<tr>
<td>Aboulker Isabelle</td>
</tr>
<tr>
<td>Adam Adolphe</td>
</tr>
</tbody>
</table>Run Code Online (Sandbox Code Playgroud)
小智 6
对于那些通过谷歌发现这个问题的人......
Bootstrap 表假设您将thead在标记中使用 a ,这就是为什么会出现顶行。如果您有包含标题和不包含标题的混合表格,您可以使用以下 CSS 正确设置它们的样式。
/* Remove the top border when a table is missing the header */
.table > tbody > tr:first-child > td {
border: none;
}
/* Include the border when there's a header */
.table > thead + tbody > tr:first-child > td {
border-top: 1px solid #ddd;
}
Run Code Online (Sandbox Code Playgroud)
http://jsfiddle.net/colinjmiller93/fwsmpu5u/1/
| 归档时间: |
|
| 查看次数: |
11927 次 |
| 最近记录: |