这不是一个问题,实际上它是一个简单的解决方案,使用纯粹的css使你的表体垂直滚动,仅在Firefox 3.5.2中测试,假设正确的表DOM定义(table,thead,tbody).
<style>
.someTBODYclassName {
height: 100px,
overflow-x: hidden,
overflow-y: visible
}
</style>
Run Code Online (Sandbox Code Playgroud)
当然,使用jQuery或纯Javascript可能会更棘手.
var maxHeightOfTBODY = your_calculations_here;
$("#TableId tbody.someTBODYclassName") //make it scrollable
.css({
"height": maxHeightOfTBODY+"px",
"overflow-x": "hidden",
"overflow-y": "visible",
"width": "100%"
});
Run Code Online (Sandbox Code Playgroud)
问题是什么?(常问问题)
对于这种情况你需要JQuery吗?
看看这个:http: //css-tricks.com/video-screencasts/66-table-styling-2-fixed-header-and-highlighting/
| 归档时间: |
|
| 查看次数: |
9370 次 |
| 最近记录: |