锁表头

<div class="lockContainer" style="width: 99%;height:80%;overflow-x:hidden;">
<table class="formTable" width="100%" >
<thead>
<tr>
<td class="Locked" style="width:100px;TEXT-ALIGN: center;">
销售凭证
</td>
<td class="Locked" style="width:150px;TEXT-ALIGN: center;">
车工号
</td>
<td class="Locked" style="width:100px;TEXT-ALIGN: center;">
实际结束:执行(日期)
</td>
<td class="Locked" style="width:80px;TEXT-ALIGN: center;">
订单优先级
</td>

</tr>
</thead>
<tbody>循环内容.............
</tbody>

</div>

lockTable.css 内容如下

 

 

.lockContainer{
overflow: scroll;border: solid 1px #86B9E4;
}
.lockTable{
border-collapse: collapse;
}
.lockTable td
{

position: relative;
padding: 0.5px;
border-top: solid 0px #86B9E4;
border-bottom: solid 1px #86B9E4;
border-left: solid 0px #86B9E4;
border-right: solid 1px #86B9E4;
}

.lockTable td.Locked /* 水平与垂直方向锁住单元格, 不随鼠标或滚动条移动 */
{

z-index: 30; position: relative;
background-color: #f3f3f3;
text-align: center;
border-top: solid 0px #86B9E4;
border-bottom: solid 1px #86B9E4;
border-left: solid 0px #86B9E4;
border-right: solid 1px #86B9E4;
top: expression(parentNode.parentNode.parentNode.parentNode.scrollTop);
left: expression(parentNode.parentNode.parentNode.parentNode.scrollLeft);

}

.lockTable td.HLocked /* 水平方向锁住单元格 */
{

z-index: 10; position: relative;
background-color: #f3f3f3;
text-align: center;
border-top: solid 0px #86B9E4;
border-bottom: solid 1px #86B9E4;
border-left: solid 0px #86B9E4;
border-right: solid 1px #86B9E4;
left: expression(parentNode.parentNode.parentNode.parentNode.scrollLeft);


}

.lockTable td.VLocked /* 垂直方向锁住单元格 */
{
z-index: 20; position: relative;
background-color: #f3f3f3;
text-align: center;
border-top: solid 0px #86B9E4;
border-bottom: solid 1px #86B9E4;
border-left: solid 0px #86B9E4;
border-right: solid 1px #86B9E4;
top: expression(parentNode.parentNode.parentNode.parentNode.scrollTop);
}

.topbar
{
z-index: 30; position: relative;
text-align: center;
top: expression(parentNode.parentNode.parentNode.parentNode.scrollTop);
left: expression(parentNode.parentNode.parentNode.parentNode.scrollLeft);
}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值