<html>
<head>
<!--<mce:style type="text/css">
body {
background: #FFF;
color: #000;
font: normal normal 12px Verdana, Geneva, Arial, Helvetica, sans-serif;
margin: 10px;
padding: 0
}
table, td, a {
color: #000;
font: normal normal 12px Verdana, Geneva, Arial, Helvetica, sans-serif
}
.td
{
nowrap:'true';
}
div.tableContainer {
clear: both;
border: 1px solid #963;
height: expression(document.body.clientHeight*0.1);
overflow: auto;
width: 100%;
}
/* WinIE 6.x needs to re-account for it's scrollbar. Give it some padding */
\html div.tableContainer/* */ {
padding: 0 16px 0 0
}
/* clean up for allowing display Opera 5.x/6.x and MacIE 5.x */
html>body div.tableContainer {
height: auto;
padding: 0;
width: 740px
}
/* Reset overflow value to hidden for all non-IE browsers. */
/* Filter out Opera 5.x/6.x and MacIE 5.x */
head:first-child+body div[class].tableContainer {
height: 285px;
overflow: hidden;
width: 756px
}
/* define width of table. IE browsers only */
/* if width is set to 100%, you can remove the width */
/* property from div.tableContainer and have the div scale */
div.tableContainer table {
float: left;
width: 100%
}
/* WinIE 6.x needs to re-account for padding. Give it a negative margin */
\html div.tableContainer table/* */ {
margin: 0 -16px 0 0
}
/* define width of table. Opera 5.x/6.x and MacIE 5.x */
html>body div.tableContainer table {
float: none;
margin: 0;
width: 740px
}
/* define width of table. Add 16px to width for scrollbar. */
/* All other non-IE browsers. Filter out Opera 5.x/6.x and MacIE 5.x */
head:first-child+body div[class].tableContainer table {
width: 756px
}
/* set table header to a fixed position. WinIE 6.x only */
/* In WinIE 6.x, any element with a position property set to relative and is a child of */
/* an element that has an overflow property set, the relative value translates into fixed. */
/* Ex: parent element DIV with a class of tableContainer has an overflow property set to auto */
thead.fixedHeader tr {
position: relative;
/* expression is for WinIE 5.x only. Remove to validate and for pure CSS solution */
top: expression(document.getElementById("tableContainer").scrollTop)
}
/* set THEAD element to have block level attributes. All other non-IE browsers */
/* this enables overflow to work on TBODY element. All other non-IE, non-Mozilla browsers */
/* Filter out Opera 5.x/6.x and MacIE 5.x */
head:first-child+body thead[class].fixedHeader tr {
display: block
}
/* make the TH elements pretty */
thead.fixedHeader th {
background: #C96;
border-left: 1px solid #EB8;
border-right: 1px solid #B74;
border-top: 1px solid #EB8;
font-weight: normal;
padding: 4px 3px;
text-align: center
}
/* make the A elements pretty. makes for nice clickable headers */
thead.fixedHeader a, thead.fixedHeader a:link, thead.fixedHeader a:visited {
color: #FFF;
display: block;
text-decoration: none;
width: 100%
}
/* make the A elements pretty. makes for nice clickable headers */
/* WARNING: swapping the background on hover may cause problems in WinIE 6.x */
thead.fixedHeader a:hover {
color: #FFF;
display: block;
text-decoration: underline;
width: 100%
}
/* define the table content to be scrollable */
/* set TBODY element to have block level attributes. All other non-IE browsers */
/* this enables overflow to work on TBODY element. All other non-IE, non-Mozilla browsers */
/* induced side effect is that child TDs no longer accept width: auto */
/* Filter out Opera 5.x/6.x and MacIE 5.x */
head:first-child+body tbody[class].scrollContent {
display: block;
height: 262px;
overflow: auto;
width: 100%
}
/* make TD elements pretty. Provide alternating classes for striping the table */
/* http://www.alistapart.com/articles/zebratables/ */
tbody.scrollContent td, tbody.scrollContent tr.normalRow td {
background: #FFF;
border-bottom: 1px solid #EEE;
border-left: 1px solid #EEE;
border-right: 1px solid #AAA;
border-top: 1px solid #AAA;
padding: 2px 3px
}
tbody.scrollContent tr.alternateRow td {
background: #EEE;
border-bottom: 1px solid #EEE;
border-left: 1px solid #EEE;
border-right: 1px solid #AAA;
border-top: 1px solid #AAA;
padding: 2px 3px
}
/* define width of TH elements: 1st, 2nd, and 3rd respectively. */
/* All other non-IE browsers. Filter out Opera 5.x/6.x and MacIE 5.x */
/* Add 16px to last TH for scrollbar padding */
/* http://www.w3.org/TR/REC-CSS2/selector.html#adjacent-selectors */
head:first-child+body thead[class].fixedHeader th {
width: 200px
}
head:first-child+body thead[class].fixedHeader th + th {
width: 250px
}
head:first-child+body thead[class].fixedHeader th + th + th {
border-right: none;
padding: 4px 4px 4px 3px;
width: 316px
}
/* define width of TH elements: 1st, 2nd, and 3rd respectively. */
/* All other non-IE browsers. Filter out Opera 5.x/6.x and MacIE 5.x */
/* Add 16px to last TH for scrollbar padding */
/* http://www.w3.org/TR/REC-CSS2/selector.html#adjacent-selectors */
head:first-child+body tbody[class].scrollContent td {
width: 200px
}
head:first-child+body tbody[class].scrollContent td + td {
width: 250px
}
head:first-child+body tbody[class].scrollContent td + td + td {
border-right: none;
padding: 2px 4px 2px 3px;
width: 300px
/* expression is for WinIE 5.x only. Remove to validate and for pure CSS solution */
top: expression(document.getElementById("tableContainer").scrollTop)
}
</mce:style>-->
<style type="text/css">
body {
background: #FFF;
color: #000;
font: normal normal 12px Verdana, Geneva, Arial, Helvetica, sans-serif;
margin: 10px;
padding: 0
}
table, td, a {
color: #000;
font: normal normal 12px Verdana, Geneva, Arial, Helvetica, sans-serif
}
div.tableContainer {
clear: both;
border: 1px solid #963;
height: expression(document.body.clientHeight*0.1);
overflow: auto;
width: 100%;
}
/* clean up for allowing display Opera 5.x/6.x and MacIE 5.x
html>body div.tableContainer {
height: auto;
padding: 0;
width: 740px
}
*/
/* Reset overflow value to hidden for all non-IE browsers. */
/* Filter out Opera 5.x/6.x and MacIE 5.x
head:first-child+body div[class].tableContainer {
height: 285px;
overflow: hidden;
width: 756px
}
*/
/* define width of table. IE browsers only */
/* if width is set to 100%, you can remove the width */
/* property from div.tableContainer and have the div scale */
div.tableContainer table {
float: left;
width: 100%
}
/* WinIE 6.x needs to re-account for padding. Give it a negative margin
\html div.tableContainer table/* {
margin: 0 -16px 0 0
} */
/* define width of table. Opera 5.x/6.x and MacIE 5.x
html>body div.tableContainer table {
float: none;
margin: 0;
width: 740px
} */
/* define width of table. Add 16px to width for scrollbar. */
/* All other non-IE browsers. Filter out Opera 5.x/6.x and MacIE 5.x
head:first-child+body div[class].tableContainer table {
width: 756px
} */
/* set table header to a fixed position. WinIE 6.x only */
/* In WinIE 6.x, any element with a position property set to relative and is a child of */
/* an element that has an overflow property set, the relative value translates into fixed. */
/* Ex: parent element DIV with a class of tableContainer has an overflow property set to auto */
thead.fixedHeader tr {
position: relative;
/* expression is for WinIE 5.x only. Remove to validate and for pure CSS solution */
top: expression(document.getElementById("tableContainer").scrollTop)
}
/* set THEAD element to have block level attributes. All other non-IE browsers */
/* this enables overflow to work on TBODY element. All other non-IE, non-Mozilla browsers */
/* Filter out Opera 5.x/6.x and MacIE 5.x
head:first-child+body thead[class].fixedHeader tr {
display: block
} */
/* make the TH elements pretty */
thead.fixedHeader th {
background: #C96;
border-left: 1px solid #EB8;
border-right: 1px solid #B74;
border-top: 1px solid #EB8;
font-weight: normal;
padding: 4px 3px;
text-align: center
}
/* make the A elements pretty. makes for nice clickable headers */
thead.fixedHeader a, thead.fixedHeader a:link, thead.fixedHeader a:visited {
color: #FFF;
display: block;
text-decoration: none;
width: 100%
}
/* make the A elements pretty. makes for nice clickable headers */
/* WARNING: swapping the background on hover may cause problems in WinIE 6.x */
thead.fixedHeader a:hover {
color: #FFF;
display: block;
text-decoration: underline;
width: 100%
}
/* define the table content to be scrollable */
/* set TBODY element to have block level attributes. All other non-IE browsers */
/* this enables overflow to work on TBODY element. All other non-IE, non-Mozilla browsers */
/* induced side effect is that child TDs no longer accept width: auto */
/* Filter out Opera 5.x/6.x and MacIE 5.x
head:first-child+body tbody[class].scrollContent {
display: block;
height: 262px;
overflow: auto;
width: 100%
} */
/* make TD elements pretty. Provide alternating classes for striping the table */
/* http://www.alistapart.com/articles/zebratables/ */
tbody.scrollContent td, tbody.scrollContent tr.normalRow td {
background: #FFF;
border-bottom: 1px solid #EEE;
border-left: 1px solid #EEE;
border-right: 1px solid #AAA;
border-top: 1px solid #AAA;
padding: 2px 3px
}
tbody.scrollContent tr.alternateRow td {
background: #EEE;
border-bottom: 1px solid #EEE;
border-left: 1px solid #EEE;
border-right: 1px solid #AAA;
border-top: 1px solid #AAA;
padding: 2px 3px
}
/* define width of TH elements: 1st, 2nd, and 3rd respectively. */
/* All other non-IE browsers. Filter out Opera 5.x/6.x and MacIE 5.x */
/* Add 16px to last TH for scrollbar padding */
/* http://www.w3.org/TR/REC-CSS2/selector.html#adjacent-selectors
head:first-child+body thead[class].fixedHeader th {
width: 200px
}
head:first-child+body thead[class].fixedHeader th + th {
width: 250px
}
head:first-child+body thead[class].fixedHeader th + th + th {
border-right: none;
padding: 4px 4px 4px 3px;
width: 316px
} */
/* define width of TH elements: 1st, 2nd, and 3rd respectively. */
/* All other non-IE browsers. Filter out Opera 5.x/6.x and MacIE 5.x */
/* Add 16px to last TH for scrollbar padding */
/* http://www.w3.org/TR/REC-CSS2/selector.html#adjacent-selectors
head:first-child+body tbody[class].scrollContent td {
width: 200px
}
head:first-child+body tbody[class].scrollContent td + td {
width: 250px
}
head:first-child+body tbody[class].scrollContent td + td + td {
border-right: none;
padding: 2px 4px 2px 3px;
width: 300px
top: expression(document.getElementById("tableContainer").scrollTop)
}*/ </style>
</head><body>
<div id="tableContainer" class="tableContainer">
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="scrollTable">
<thead class="fixedHeader">
<tr>
<th><a href="#" mce_href="#">Header 1</a></th>
<th><a href="#" mce_href="#">Header 2</a></th>
<th><a href="#" mce_href="#">Header 3</a></th>
<th><a href="#" mce_href="#">Header 4</a></th>
<th><a href="#" mce_href="#">Header 5</a></th>
<th><a href="#" mce_href="#">Header 6</a></th>
<th><a href="#" mce_href="#">Header 7</a></th>
</tr>
</thead>
<tbody class="scrollContent">
<tr>
<td>Cell Content 1</td>
<td>Cell Content 2</td>
<td>Cell Content 3</td>
<td>Cell Content 4</td>
<td>Cell Content 5</td>
<td>Cell Content 6</td>
<td>Cell Content 7</td>
</tr>
<tr>
<td>More Cell Content 1</td>
<td>More Cell Content 2</td>
<td>More Cell Content 3</td>
<td>More Cell Content 4</td>
<td>More Cell Content 5</td>
<td>More Cell Content 6</td>
<td>More Cell Content 7</td>
</tr>
<tr>
<td nowrap>Even More Cell Content 1</td>
<td nowrap>Even More Cell Content 2</td>
<td nowrap>Even More Cell Content 3</td>
<td nowrap>Even More Cell Content 4</td>
<td nowrap>Even More Cell Content 5</td>
<td nowrap>Even More Cell Content 6</td>
<td nowrap>Even More Cell Content 7</td>
</tr>
<tr>
<td>And Repeat 1</td>
<td>And Repeat 2</td>
<td>And Repeat 3</td>
<td>And Repeat 4</td>
<td>And Repeat 5</td>
<td>And Repeat 6</td>
<td>And Repeat 7</td>
</tr>
</tbody>
</table>
</div>
</body></html>
分享到:
相关推荐
### 表格表头固定,内容可以滚动的技术实现 在网页设计中,有时我们需要实现一个功能:当用户滚动表格内容时,表头始终固定显示在顶部,以便于用户查看列名,提高数据阅读效率。本篇文章将围绕这一需求展开讨论,并...
标题“左侧是表头的表格”暗示我们正在讨论一种特殊布局的表格,其中表头位于左侧,这在处理大量列数据时特别有用,因为它允许用户更容易地浏览和理解表格的内容。这种类型的表格常见于数据分析、报表展示以及各种...
### 隐藏LayUI数据表格表头的Checkbox复选框方法详解 #### 背景介绍 在前端开发过程中,经常会使用到LayUI框架搭建网页应用,尤其是在设计复杂的数据展示界面时,LayUI提供了强大的数据表格功能。然而,在某些场景...
然而,有时候我们需要创建更复杂的表格布局,比如带有多行表头的表格。标题"qt 表格多行表头,复杂表头"正是指向这样一个需求。在描述中提到的“占用两行数据,利用合并表格功能实现多行表头”是实现这一功能的一种...
为了提高视觉效果,有时需要在表格表头中添加斜线来区隔不同的表头内容。实现斜线表头有多种方法,下面将详细介绍这五种方法的实现原理和适用场景。 1. 图片背景法 直接利用UI设计人员制作好的带有斜线的图片作为...
易语言,作为一款中文编程语言,提供了丰富的库和方法来实现各种界面元素的美化,包括表格表头。本篇文章将深入探讨如何利用易语言来美化表格的表头,以及其中涉及到的关键技术。 首先,"表格表头的美化"主要是指...
"高级表格复合表头"是易语言高级表格的一个特色功能,它提供了更强大的数据组织和显示能力。复合表头意味着用户可以在表格的列头上设置多层分级的标题,这样的设计有助于对大量数据进行分类和分组,使数据更加清晰...
"Table 表格 表头表尾浮动显示" 是一种优化表格用户体验的技术,它允许用户在滚动浏览长表格时,表头(thead)和表尾(tfoot)始终保持可见,方便用户对照和理解数据。这种技术尤其适用于移动端或者空间有限的界面,...
复合表头则是指在表格上方设置多个层次的表头,用于区分和组织复杂的列结构,如主表头和子表头的组合,这在处理多维度数据时非常有用。 复合表头的设计通常涉及到以下几个关键技术点: 1. **表头分层**:在易语言...
在网页设计中,固定表格表头是一项常见的需求,特别是在数据量大、需要横向或纵向滚动查看的场景下。固定表头可以使用户在滚动内容时始终能看到列名,从而提高数据可读性和用户体验。本篇文章将深入讲解如何实现...
HTML5_html表头固定不滚动而内容滚动的效果,表格是基于Div CSS实现的,将表头固定...在显示较多数据时,当用户滚动鼠标中轮时,表格内容会滚动,而表头固定不变,可以将表格内容与表头很好的对应,便于阅读表格内容。
在网页设计中,创建带有斜线的表格表头可以增加信息层次感,使得数据更易于理解。本示例探讨如何使用JavaScript(js)来实现这一功能。JavaScript是一种强大的客户端脚本语言,它允许我们在用户的浏览器上动态地创建...
在Vue移动端项目中,开发人员经常遇到需要创建具备固定表头和首列的表格,以提供良好的用户体验。本文将详细讲解如何在不依赖任何UI框架或插件的情况下,利用Vue的核心特性实现这样一个功能。 首先,我们需要理解...
labview给Excel数据表格加表头
Android可固定表头和第一列自定义表格,集成简单。 API使用说明: LockTableView mLockTableView=new LockTableView(this,mContentView,mTableDatas); mLockTableView.setLockFristColumn(true) //是否锁定第一列 ...
"纯CSS固定表头内容滚动表格"是一种高效且用户友好的设计技巧,它允许用户在浏览长表格时始终保持表头可见,从而方便用户理解每一列的数据含义。这种设计方法尤其适用于那些包含大量数据且需要横向滚动查看的表格,...
标题中的“点击表格表头排序 一个国外收费js控件”指的是一个JavaScript库或插件,主要用于实现网页中表格数据的动态排序功能。用户只需点击表格的列头,即可按照该列的数据进行升序或降序排列。这种控件通常包含一...
`tablesorter`的核心功能在于它能够监听表格的表头(thead)点击事件,通过内置的算法对表格行(tr)进行动态排序。它支持多种类型的排序,包括数字、日期、字母顺序等,并且可以自定义排序规则。以下是对`...
易语言源码易语言表格表头的美化源码.rar 易语言源码易语言表格表头的美化源码.rar 易语言源码易语言表格表头的美化源码.rar 易语言源码易语言表格表头的美化源码.rar 易语言源码易语言表格表头的美化源码.rar ...