<style>
.Freezing
{
position:relative ;
table-layout:fixed;
top:expression(this.offsetParent.scrollTop);
z-index: 10;
}
.Freezing th{text-overflow:ellipsis;overflow:hidden;white-space: nowrap;padding:0px;}
</style>
<div class="Freezing" align="center"></div>
搞定你
.Freezing
{
position:relative ;
table-layout:fixed;
top:expression(this.offsetParent.scrollTop);
z-index: 10;
}
.Freezing th{text-overflow:ellipsis;overflow:hidden;white-space: nowrap;padding:0px;}
</style>
<div class="Freezing" align="center"></div>
搞定你
本文介绍了一种使用CSS实现表头冻结的方法,通过设置相对定位和固定布局等属性,使得表格在滚动时表头仍保持可见。此外还涉及了文本溢出隐藏及 nowrap 属性的应用。
548

被折叠的 条评论
为什么被折叠?



