政府机关

固定表头的JS

一)添加全局类.zdy25 /*自定义固定列标题*/{ padding:3px 5px 3px 5px; text-align:center; vertical-align:middle; white-space:nowrap; line-break:strict; color:#0376B4; font-size:10pt; background-color:#D2E2FB; border:1pt solid #759EDE; border-left-style:no...显示全部
一)添加全局类
.zdy25 /*自定义固定列标题*/
{
padding:3px 5px 3px 5px;
text-align:center;
vertical-align:middle;
white-space:nowrap;
line-break:strict;
color:#0376B4;
font-size:10pt;
background-color:#D2E2FB;
border:1pt solid #759EDE;
border-left-style:none;
position:relative;
top: expression(this.offsetParent.scrollTop); /*IE5+ only*/
z-index: 1;
}
.zdy26 /*自定义固定行标题*/
{
padding:3px 5px 3px 5px;
text-align:left;
vertical-align:middle;
white-space:nowrap;
line-break:strict;
color:#0376B4;
font-size:10pt;
background-color:#EBF6FA;
border:1pt solid #759EDE;
border-top-style:none;
position:relative;
left: expression(this.offsetParent.scrollLeft); /*IE5+ only*/
z-index: 1;
}
.zdy27 /*自定义固定行标题-合计*/
{
padding:3px 5px 3px 5px;
text-align:center;
vertical-align:middle;
white-space:nowrap;
line-break:strict;
color:#0376B4;
font-size:10pt;
font-weight:bold;
background-color:#EBF6FA;
border:1pt solid #759EDE;
border-top-style:none;
position:relative;
left: expression(this.offsetParent.scrollLeft); /*IE5+ only*/
z-index: 1;
}
.zdy28 /*自定义固定交叉表角*/
{
padding:3px 5px 3px 5px;
text-align:center;
vertical-align:middle;
white-space:nowrap;
line-break:strict;
color:#0376B4;
font-size:10pt;
background-color:#D2E2FB;
border:1pt solid #759EDE;
position:relative;
top: expression(this.offsetParent.scrollTop); /*IE5+ only*/
left: expression(this.offsetParent.scrollLeft); /*IE5+ only*/
z-index: 2;   /*务必大于列标题样式和行标题样式中的值,表示置于顶层的含义*/
}

二)页面布局:



1.在块中插入列表,依次放入数据项。设置块的高度为450.
2.在表格前加入html项目,写入如下:

表格后加入html项目,写入如下:

3.选中列表列标题,设置类为固定表头和固定列表列标题即可。

这两个类也可以写成自定义类。
建新自定义类,然后工具--复制到剪贴-把新建 的类的内容改成上边的就可以了。收起
参与82

查看其它 77 个回答林怡彤的回答

林怡彤林怡彤工程师恒生
谢谢楼主的无私奉献,求效果图。。。
金融其它 · 2011-09-13
浏览403

回答者

林怡彤
工程师恒生

林怡彤 最近回答过的问题

回答状态

  • 发布时间:2011-09-13
  • 关注会员:4 人
  • 回答浏览:403
  • X社区推广