我想溢出我的 table 。
-----------------------
| name | height |
-----------------------
| john | 5,8 ^
| josh | 6,4 |
| joshua | 5,4 |
| jon | 5,5 V
-----------------------
我使用了 overflow-y:scroll; 但我想要的是,只有表体在滚动。我想要的就像我上面的例子。
<table class="table table-hover table-responsive">
<thead>
<tr>
...
</tr>
</thead>
<tbody>
<tr>
...
</tr>
<tr>
...
</tr>
</tbody>
是否可以只溢出表体部分?我正在使用 Bootstrap 。
最佳答案
最简单的方法:
在一个表中添加两个表,比如 tabel1 和 table2。
现在在 table1 中包含表头,在 table2 中包含表体。
对表 2 使用 style="overflow:auto;"
或 style="overflow:scroll;"
。
关于jquery - Bootstrap 表溢出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35548970/