【发布时间】:2015-04-20 01:02:38
【问题描述】:
我有 2 个使用 DataTable 的表:
- 顶部:完全匹配
- 底部:相关
这是他们现在的样子。
如您所见,不需要在第二个表格上显示表格标题。我想隐藏它。
我已经尝试在我的 CSS 上使用它:
由于 class= inventory_related
.inventory_related table thead {
display:none;
}
我也试过全脱掉:
<thead class="thin-border-bottom ">
<th>Catalog # </th>
<th>Description</th>
<th>Available Vials</th>
</thead>
这也不行。
有人对如何隐藏我的第二个表格标题有任何建议吗?
谢谢。
【问题讨论】:
-
类名
inventory_related在<table>上吗?如果是这样,您需要table.inventory_related thead(但最好省略元素并写.inventory_related thead) -
一张表上只能有一个
classattribute。改为<table class="display inventory_related" id="inventory_related">对不起,我不是故意的。应该是这样的<table class="display inventory_related" id="inventory_related" >
标签: html css datatables jquery-datatables