【问题标题】:html table scrollable div only for trhtml 表格可滚动 div 仅适用于 tr
【发布时间】:2015-10-18 16:34:24
【问题描述】:

http://jsfiddle.net/AKAKAK4/hyua6zyk/2/

请检查我的小提琴,让我知道如何让滚动条仅适用于表格内容而不适用于标题。 滚动条也出现在最后,而不是紧挨着最后一列,我怎样才能让它工作?

我在 CSS 中有一些注释掉的代码,我希望通过这些代码实现固定表头:

#table-wrapper table thead th .uploadedDocsHdr {
position:absolute; }  

【问题讨论】:

  • 丹尼尔斯回答stackoverflow.com/questions/14834198/…的附加链接
  • 请更新此线程,接受答案或通过评论或编辑提供详细信息,甚至自行回答为什么它不回答您的问题。

标签: html css html-table scrollbar


【解决方案1】:

这个已经回答过很多次了,例如:

Table scroll with HTML and CSS

Table header to stay fixed at the top when user scrolls it out of view with jQuery

How to: Fixed Table Header with ONE table (no jQuery)

HTML table with fixed headers?

Table with fixed header and fixed column on pure css

我不确定哪个是最佳答案,但毫无疑问,如果您只是在 stackoverflow 中搜索“固定表头”,那么您的确切情况已经有了完美的答案

【讨论】:

    猜你喜欢
    • 2018-12-27
    • 1970-01-01
    • 2011-04-24
    • 1970-01-01
    • 2018-12-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多