当前位置:编程学习 > C#/ASP.NET >>

gridview 固定表头

在网上看到了很多的办法,但是我自己用了都没有成功啊,我想只用css实现
一般的方法是:
       <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:2px;}
 </style> 


  <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" CssClass="Freezing"/>

用法:CSS设如上的样式,HeaderStyle加CssClass="Freezing"
我是按照这样写的,但是总是不能实现固定表头啊,请问有哪里需要注意的吗?

补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,