页面table通常都需要做表头固定,参考了n种实现方式,最终还是选择了用纯css来做表头固定,只是因为方便,易于调试。
table tbody {
display: block;
height: 450px;
overflow-y: scroll;
}
table thead, tbody tr {
display: table;
width: 100%;
table-layout: fixed;
}
table thead {
width: calc(100% - 1em)
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)