我有一个表,第一列固定,水平滚动其他列。 我们使用特定的CSS类获取第一列的单元格,如下所示:
tr > th.fixed, td.fixed {
position:absolute;
width: 25em;
left: 3em;
top:auto;
}
HTML代码如下:
<div class="fm-list-container">
<div class="table-responsive">
<table class="table table-striped">
...
</table>
</div>
</div>
我们为内部div(&#34;表格响应&#34; CSS类)和 overflow-y:visible 设置了 overflow-x:auto 外部div(&#34; fm-list-container&#34; CSS类)。 如果我们有很多行,则水平滚动条显示在表格的底部,因此它不可见。有没有办法让水平滚动条始终可见(第一列被冻结)? 我们已尝试设置内部div的 max-height ,但此属性不适用于第一列。因此,第一列和其他列具有不同的垂直滚动。 有解决方案吗?提前谢谢。
答案 0 :(得分:0)
如果你正在使用bootstrap它看起来像使用角度js版本 https://angular-ui.github.io/bootstrap/ 然后使用max-height应该可以工作。