固定表格的标题列_2(CSS)

类别:.NET开发 点击:0 评论:0 推荐:
<html>
 <body>
  <div style="overflow:auto;height:100px;">
     <table width="100%">
     <TR style="position:relative;top:expression(this.offsetParent.scrollTop);background:navy;color:white;">
     <TH nowrap>Header A</TH>
     <TH nowrap>Header B</TH>
     <TH nowrap>Header C</TH>
     </TR>
     <TR>
     <TD>A</TD>
     <TD>B</TD>
     <TD>C</TD>
     </TR>
     <TR>
     <TD>A</TD>
     <TD>B</TD>
     <TD>C</TD>
     </TR>
     <TR>
     <TD>A</TD>
     <TD>B</TD>
     <TD>C</TD>
     </TR>
     <TR>
     <TD>A</TD>
     <TD>B</TD>
     <TD>C</TD>
     </TR>
     <TR>
     <TD>A</TD>
     <TD>B</TD>
     <TD>C</TD>
     </TR>
     <TR>
     <TD>A</TD>
     <TD>B</TD>
     <TD>C</TD>
     </TR>
     <TR>
     <TD>A</TD>
     <TD>B</TD>
     <TD>C</TD>
     </TR>
     <TR>
     <TD>A</TD>
     <TD>B</TD>
     <TD>C</TD>
     </TR>
     <TR>
     <TD>A</TD>
     <TD>B</TD>
     <TD>C</TD>
     </TR>
     </table>
  </div>
 </body>
</html>

本文地址:http://com.8s8s.com/it/it42704.htm