用css 来冻结gridview 表头

liu382337172 liu382337172 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
一个gridview 中有若干条数据,(没有有分页)下面这个放到别的*.css中总是报错。 哪位好心人知道一个完整的控制表头冻结的css 。。



.FixedTitleRow
{
position: relative;
table-layout:fixed;
top: expression(this.offsetParent.scrollTop-2);
background-color:White;
z-index: 10;
}

.FixedTitleRow th
{
text-overflow:ellipsis;
overflow:hidden;
white-space: nowrap;
padding:2px;
}

.FixedTitleColumn
{
position: relative;
left: expression(this.parentElement.offsetParent.scrollLeft-2);
}

.FixedDataColumn
{
position: relative;
left: expression(this.parentElement.offsetParent.offsetParent.scrollLeft-2);
}
...全文
评论 11
收藏 已收藏
分享
返回顶部
liu382337172
.NET社区 62,271 成员 668,968 内容