<!-- CSS goes in the document HEAD or added to your external stylesheet -->
<style type="text/css">
table.gridtable {
font-family: verdana,arial,sans-serif;
font-size:11px;
color:#333333;
border-width: 1px;
border-color: #666666;
border-collapse: collapse;
}
table.gridtable th {
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #666666;
background-color: #dedede;
}
table.gridtable td {
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #666666;
background-color: #ffffff;
}
</style>
<!-- Table goes in the document BODY -->
<table class="gridtable">
<tr>
<th>Info Header 1</th><th>Info Header 2</th><th>Info Header 3</th>
</tr>
<tr>
<td>Text 1A</td><td>Text 1B</td><td>Text 1C</td>
</tr>
<tr>
<td>Text 2A</td><td>Text 2B</td><td>Text 2C</td>
</tr>
</table>
------------
<!-- CSS goes in the document HEAD or added to your external stylesheet -->
<style type="text/css">
table.hovertable {
font-family: verdana,arial,sans-serif;
font-size:11px;
color:#333333;
border-width: 1px;
border-color: #999999;
border-collapse: collapse;
}
table.hovertable th {
background-color:#c3dde0;
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #a9c6c9;
}
table.hovertable tr {
background-color:#d4e3e5;
}
table.hovertable td {
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #a9c6c9;
}
</style>
<!-- Table goes in the document BODY -->
<table class="hovertable">
<tr>
<th>Info Header 1</th><th>Info Header 2</th><th>Info Header 3</th>
</tr>
<tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td>Item 1A</td><td>Item 1B</td><td>Item 1C</td>
</tr>
<tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td>Item 2A</td><td>Item 2B</td><td>Item 2C</td>
</tr>
<tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td>Item 3A</td><td>Item 3B</td><td>Item 3C</td>
</tr>
<tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td>Item 4A</td><td>Item 4B</td><td>Item 4C</td>
</tr>
<tr onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
<td>Item 5A</td><td>Item 5B</td><td>Item 5C</td>
</tr>
</table>
分享到:
相关推荐
主要介绍了html Table 表头固定的实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
HTML Table 漂亮的CSS 包含了格式各样的CSS,代码非常独立,肯定能够让你用到的。
HTML TABLE批量添加行与删除行.javascript实现。
一个首行表头、最左列和最右列固定中间滚动的html table样式。 一个首行表头、最左列和最右列固定中间滚动的html table样式。 一个首行表头、最左列和最右列固定中间滚动的html table样式。 一个首行表头、最左列...
主要介绍了利用js制作html table的分页示例(js实现分页),需要的朋友可以参考下
使用html做复杂的表格。复杂表格一般是用到td的两个属性:rowspan 、colspan属性值。 在html中<td> 标签定义 HTML 表格中的标准单元格。 (1)rowspan 属性规定单元格可横跨的行数;...table id="tab" cellpadding="1
html table 固定表头和列,下载后,运行index.html页面即可看到效果。
table table自定义列排序;目前支持数值排序,文本(支持中文)排序; 示例: var option = { tableid: '#tableid', sortindex: 7, sorttype: "down", sortby: "text" }; $("#tableid").sortTable(option);
html table page
一款好用的插件 ,html table导出Excel文件。支持导出多种格式: Excel,Word,TXT,CSV,XML,SQL,JSON。等等。好用请点赞
Scrollable HTML table Source JS and Example
table1.htmltable1.htmltable1.htmltable1.htmltable1.htmltable1.htmltable1.htmltable1.html
使用table预先分区网页界面,再添加内容,学习的实例
网上找到js或jquery插件都不满足现在用的需求,所自己做个jquery插件. 主要功能类似excel对表头的操作, js文件里有使用说明。
html页面实现table自动添加和删除
将页面中的HtmlTable,导出为Execl 支持合并单位元、合并行等操作。续之前的优化了计算算法,升级了代码。
htmlTable数据表模板 转换pdf 用到itextsharp5.4.0 自定义函数 算术运算符,关系运算符,以及逻辑运算符 预定义函数getRMB(double num)getRMBs(string num) 一些默认的类型方法函数,如double, float, string, ...
使用js-xlsx纯前端导出excel
动态创建HtmlTable的问题
NULL 博文链接:https://ado88.iteye.com/blog/437305