@charset "UTF-8"; /*表格头部固定部分*/ body, div, table { margin:0; padding:0; border:0; } #tblHead{ width:100%; height:32px; position:relative; overflow:hidden; } #tblHead table{ position:absolute; width:100%; border-collapse:collapse; } #tblHead table thead th{ border:1px solid #ccc; padding:6px 10px; text-align: center; white-space: nowrap; background:url(../image/table_th_bg.gif) repeat-x; } #tblHead table tbody td{ border:1px solid #ccc; padding:6px 10px; text-align: center; white-space: nowrap; } /*表格滚动部分*/ #tblBody{ width:100%; height:300px; position:relative; overflow:scroll; } #tblBody table{ position:absolute; width:100%; border-collapse:collapse; top:-30px; } #tblBody table thead th{ border:1px solid #ccc; padding:6px 10px; text-align: center; white-space: nowrap; background:url(../image/table_th_bg.gif) repeat-x; } #tblBody table tbody td{ border:1px solid #ccc; padding:6px 10px; text-align: center; white-space: nowrap; } .tbl-tr-bg { background-color: #DBDCDE; }