固定Table第一行或某几行不随滚动条滚动而滚动

样式:

复制代码代码如下:
.fixedHead {
position: relative;
top:expression(this.offsetParent.scrollTop-2);
}

使用:

复制代码代码如下:
<div>
<table class="con_tbl">
&nbsp; &nbsp; &nbsp; &nbsp; <tr class="fixedHead">
&nbsp; &nbsp; &nbsp; &nbsp; <th>标题不动</th>
</tr>
<PRE class=html name="code">&nbsp; &nbsp; &nbsp; &nbsp; <tr>
&nbsp; &nbsp; &nbsp; <td>内容滚动</td>
</tr></PRE></table>

</div>

<P></P>
<PRE></PRE>


<P></P>

固定Table第一行或某几行不随滚动条滚动而滚动