四个好看的CSS样式表格 好看的input css样式

1. 单像素边框CSS表格



<!-- 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>

<tr>

<th>Info Header 1</th><th>Info Header 2</th><th>Info Header 3</th>

</tr>

<tr>
四个好看的CSS样式表格 好看的input css样式

<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>

2.带背景图的CSS样式表格



<!-- CSS goes in the document HEAD or added to your external stylesheet -->

<style type="text/css">

table.imagetable {

font-family: verdana,arial,sans-serif;

font-size:11px;

color:#333333;

border-width: 1px;

border-color: #999999;

border-collapse: collapse;

}

table.imagetable th {

background:#b5cfd2 url('cell-blue.jpg');

border-width: 1px;

padding: 8px;

border-style: solid;

border-color: #999999;

}

table.imagetable td {

background:#dcddc0 url('cell-grey.jpg');

border-width: 1px;

padding: 8px;

border-style: solid;

border-color: #999999;

}

</style>

<!-- Table goes in the document BODY -->

<table>

<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>

3.自动换整行颜色的CSS样式表格(需要用到JSP)



<!-- Javascript goes in the document HEAD -->

<script type="text/javascript">

function altRows(id){

if(document.getElementsByTagName){

var table = document.getElementById(id);

var rows = table.getElementsByTagName("tr");

for(i = 0; i < rows.length; i++){

if(i % 2 == 0){

rows[i].className = "evenrowcolor";

}else{

rows[i].className = "oddrowcolor";

}

}

}

}

window.onload=function(){

altRows('alternatecolor');

}

</script>

<!-- CSS goes in the document HEAD or added to your external stylesheet -->

<style type="text/css">

table.altrowstable {

font-family: verdana,arial,sans-serif;

font-size:11px;

color:#333333;

border-width: 1px;

border-color: #a9c6c9;

border-collapse: collapse;

}

table.altrowstable th {

border-width: 1px;

padding: 8px;

border-style: solid;

border-color: #a9c6c9;

}

table.altrowstable td {

border-width: 1px;

padding: 8px;

border-style: solid;

border-color: #a9c6c9;

}

.oddrowcolor{

background-color:#d4e3e5;

}

.evenrowcolor{

background-color:#c3dde0;

}

</style>

<!-- Table goes in the document BODY -->

<table id="alternatecolor">

<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>

</tr>

<tr>

<td>Text 3A</td><td>Text 3B</td><td>Text 3C</td>

</tr>

<tr>

<td>Text 4A</td><td>Text 4B</td><td>Text 4C</td>

</tr>

<tr>

<td>Text 5A</td><td>Text 5B</td><td>Text 5C</td>

</tr>

</table>

4.鼠标悬停高亮的CSS样式表格 (需要JSP)



<!-- 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>

<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>

  

爱华网本文地址 » http://www.aihuau.com/a/25101011/67504.html

更多阅读

四个字的网名,好听的非主流四个字 好听的四个字网名

大家好,这里的QQ空间登陆的网名大全栏目,上几次这几篇把网名分成字数的网名很受大家欢迎,分别是“二个字网名_非主流二字网名大全与 三个字网名大全_非主流好听三字网名带诗意” 深受大家的喜爱,这次的网名是四字,这篇文章给大家提

穷小子坐着四个圈的车去了趟南京 部落冲突7本四个圈

居然就坐着一辆四个圈的车去了趟南京。今天上午上班快到九点多的样子,我们老大突然把我叫了进去,说让我去接一位大校,据传是南京军区的政治部主任。好家伙,这么大的官哈。接人行动是从12:00多开始的,开车的是一位和俺爸年龄相若的老师傅,车

唐太宗十四个儿子的悲惨结局 水浒传结局悲惨的原因

唐太宗十四个儿子的悲惨结局凉月轻风唐太宗李世民可谓是千古英帝,在战场上,他能挥师杀敌;夺得天下后,又是治世之能君。可惜,无情最是帝王家,他共有十四个儿子,其中三个被杀,三个自杀,三个早夭;一个被“幽闭”,两个被废为“庶人”,尔后又被流放

第四个和尚的故事 三个和尚挑水吃的故事

俗话说:一个和尚挑水吃,两个和尚抬水吃,三个和尚没水吃。那么第四个和尚来了,又会怎么样呢?——某寺庙的三个和尚听说要来新和尚了,不禁眉头舒展、喜笑颜开了。他们破天荒的放弃了往常一贯的争吵,心平气和的坐到一起,商讨起今后吃水用水的

声明:《四个好看的CSS样式表格 好看的input css样式》为网友不過如此分享!如侵犯到您的合法权益请联系我们删除