数据表:如何隐藏表头? [英] DataTable : How to hide table header?

查看:1418
本文介绍了数据表:如何隐藏表头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个使用DataTable的表:


  • top:精确匹配
  • 底部:相关



以下是他们现在的样子。



正如你所看到的那样,不需要在第二张桌子上显示表头。我想隐藏它。



我试过在我的CSS上使用它:



由于class = inventory_related

  .inventory_related table thead {

显示:无;

}

我也尝试过整个:

 < thead class =thin-border-bottom> 

< th>目录#< / th>
< th>说明< / th>
< th>可用的样品瓶< / th>

< / thead>

这也行不通。

任何人有任何建议我如何隐藏我的第二个表头?



谢谢。

解决方案

 <表> 
< thead style ='display:none;'>
< th>标题1< / th>
th header 2 / th>
< / thead>
< tbody>
< td>行值1< / td>
< td>行值2< / td>
< / tbody>
< / table>


I have 2 tables using DataTable :

  • top: exact match
  • bottom : related

Here is what they look like right now.

As you can see that, there is no need to show the table header on the second table. I want to hide it.

I have tried using this on my CSS :

Since the class = inventory_related

.inventory_related table thead {

        display:none;

    }

I also tried to take off the whole :

       <thead class="thin-border-bottom ">

            <th>Catalog # </th>
            <th>Description</th>
            <th>Available Vials</th>

        </thead>

This doesn't work either.

Anyone have any suggestion on how do I hide my 2nd table header ?

Thanks.

解决方案

<table>
  <thead style='display:none;'>
    <th>header 1</th>
    <th>header 2</th>
  </thead>
  <tbody>
    <td>row value 1</td>
    <td>row value 2</td>
  </tbody>
</table>

这篇关于数据表:如何隐藏表头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆