//控制表格滑動
table tbody {
display:block;
height:450px;
overflow-y:scroll;
}
//固定表頭
table thead, tbody tr {
display:table;
width:100%;
table-layout:fixed;
}
//調節表頭寬度
table thead {
background-color:#f5f5f5;
width: calc( 100% - 1.25em );
}
如果出現表頭與下面表格沒有對齊,只需要修改width: calc( 100% - 1.25em );中的xxem即可