css中怎么固定表头样式

这篇文章将为大家详细讲解有关css中怎么固定表头样式,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。

具体实现方法如下:


<style type="text/css">
/*表头样式*/
.scll {
   position: relative;
   top: expression(this.offsetParent.scrollTop);
   //background: url(../img/tab_15.gif) repeat-x left;
   background-color: #BCF4EC;
   text-align: center;
   vertical-align: middle;
   text-indent: 5px;
}

/*div样式*/
.h_500 {
   width: 100%;
   overflow: auto;
   height: 80%;/**根据具体的屏幕分辨率调整*/
   border: 0px;
}

/*细线表格*/
.TABLE {
   margin-top: 0px;
   margin-bottom: 3px;
   margin-bottom: 3px;
   border-top: 0px;
   border-bottom: 1px solid silver;
}
</style>

关于css中怎么固定表头样式就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。