View on GitHub
表格固定表头
Bootstrap Table 的固定表头扩展。
这是一个在滚动时为表格提供固定表头的扩展。
使用方法
<link rel="stylesheet" href="extensions/sticky-header/bootstrap-table-sticky-header.css">
<script src="extensions/sticky-header/bootstrap-table-sticky-header.js"></script>
示例
选项
stickyHeader
-
属性:
data-sticky-header
-
类型:
Boolean
-
详情:
设置为 true 以使用固定表头。
-
默认值:
false
stickyHeaderOffsetLeft
-
属性:
data-sticky-header-offset-left
-
类型:
Number
-
详情:
设置固定表头容器的左偏移。如果正文左侧内边距为
60px
,此值将为60
。 -
默认值:
0
stickyHeaderOffsetRight
-
属性:
data-sticky-header-offset-right
-
类型:
Number
-
详情:
设置固定表头容器的右偏移。如果正文右侧内边距为
60px
,此值将为60
。 -
默认值:
0
stickyHeaderOffsetY
-
属性:
data-sticky-header-offset-y
-
类型:
Number
-
详情:
设置从窗口顶部到固定表头的 Y 轴偏移。如果有一个高度为
60px
的固定导航栏,此值将为60
。 -
默认值:
0