我想添加表滚动的表体,但我不能得到标题排列与列。修复CSS表溢出和样式化滚动条[与JS斌]
我也想将滚动条放置在表格中而不覆盖单元格中的任何文本。
期待在工作中看到一些天才。我正在靠墙敲打我的头。
下面的代码:JSBin
CSS
tr {
width: 100%;
height:20px;
//table-layout: fixed;
}
table {
height: 220px;
white-space: nowrap;
border-collapse: collapse;
}
tbody {
overflow-y: scroll;
height: 200px;
width: 100%;
position: absolute;
}
th, td {
border: solid 1px #ccc;
padding: 2px;
}
我想在里面滚动条固定头。我已经找出了一些修补其他代码的东西。虽然小错误。 –