Html 删除twitter引导表的第一行
大家都知道,当使用Twitter引导获取表格时,会得到如下结果: 是否可以删除表格的第一行,即“Abos Girolamo”上方的那行?谢谢 更新:以下是表格的代码:Html 删除twitter引导表的第一行,html,twitter-bootstrap,html-table,Html,Twitter Bootstrap,Html Table,大家都知道,当使用Twitter引导获取表格时,会得到如下结果: 是否可以删除表格的第一行,即“Abos Girolamo”上方的那行?谢谢 更新:以下是表格的代码: <table class="table table-no-border"> <tbody> <tr> <td>Abos Girolamo</td> </tr> <tr>
<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>
阿博斯吉拉莫
关于伊莎贝尔
亚当
如果要使用jQuery:
$('#TableID tr:first-child').remove();
<html><body><table id='TableID'>
<tr>Abos Girolamo</tr>
<tr>Aboulker Isabelle</tr>
<tr>Adam Adolphe</tr>
</table></body></html>
$('TableID tr:first child').remove();
阿博斯吉拉莫
关于伊莎贝尔
亚当
在CSS中,您需要以下内容:
.table > tbody > tr:first-child {
display: none;
}
@导入url('http://getbootstrap.com/dist/css/bootstrap.css');
桌子{
边缘顶部:50px;
}
.table>thead>tr:first child>td,
.table>tbody>tr:first child>td{
边界:无;
}
阿博斯吉拉莫
关于伊莎贝尔
亚当
对于那些通过谷歌找到这个问题的人
引导表假设您将在标记中使用thead
,这就是为什么出现顶行的原因。如果混合使用了包含标题和不包含标题的表,则可以使用以下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;
}
如果您只想对特定表执行此操作,并且不希望其他CSS规则可能影响现有表,我想添加另一种可能非常有用的方法: 将
style=“border top:none”
添加到第一行的每个
元素中
例如
阿博斯吉拉莫
关于伊莎贝尔
亚当
您需要提供更多信息。具体来说,您希望使用什么技术来产生这种效果。在css中,您可以使用第一个子项
我想在csscan中执行此操作您可以给我们此表的源代码吗?我用代码进行了更新您说过要删除行,但它不在源代码中。在添加标记之前,需要为tbody添加额外的选择器。Changed and fiddle addedI不想删除第一行,但是第一行上的行,第一行上的图形行……如果它是表中的第一个子行,这仍然有效。这行是标签吗?哈。。。失败。我以为你指的是整排桌子!很抱歉。对于未来的visotr,如果需要,请不要忘记删除第一个th的边框,
.table>tbody>tr:first child>th{border:none;}
/* 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;
}