报表目录偶数列、单数列的CSS款式示例

日期:2020-10-22 类型:科技新闻 

关键词:在线网页制作,建网页,个人简介网页制作,简单网页,建立网页

HTML示例源码:

拷贝编码
编码以下:

<table class="list_table" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th>Latin name</th>
<th>fastq file</th>
<th>fasta file</th>
<th>snp</th>
<th>Article</th>
</tr>
<tr class="odd">
<td>Latimeria chalumnae</td>
<td><a href="#">fastq</a></td>
<td><a href="#">fasta</a></td>
<td><a href="#">snp</a></td>
<td><a href="#">article</a></td>
</tr>
<tr class="even">
<td>Branchiostoma floridae</td>
<td><a href="#">fastq</a></td>
<td><a href="#">fasta</a></td>
<td><a href="#">snp</a></td>
<td><a href="#">article</a></td>
</tr>
<tr class="odd">
<td>Gadus morhua</td>
<td><a href="#">fastq</a></td>
<td>NA</td>
<td><a href="#">snp</a></td>
<td><a href="#">article</a></td>
</tr>
<tr class="even">
<td>Macropus eugenii</td>
<td><a href="#">fastq</a></td>
<td><a href="#">fasta</a></td>
<td>NA</td>
<td><a href="#">article</a></td>
</tr>
</table>

CSS源码:

拷贝编码
编码以下:

/* Table CSS Document */

.list_table {
margin-top: 0px;
padding: 0;
font-size: 12px;
word-wrap:break-word;
border:2px solid #8a5603;
border-collapse:collapse;
}

.list_table td, .list_table th{
word-wrap:break-word;
border:2px solid #8a5603;
border-collapse:collapse;
}

/* 题目列 */
.list_table th{
background-color: #FC9;
}

/* 电脑鼠标历经时款式 */
.list_table tr:hover {
background-color:#CCC;
}

/* 单数列 */
.odd {
background-color: #FFC;
}

/* 偶数列 */
.even {
background-color: #FC9;
}