首页
产品
快图
小程序
微商城
网站建设
新闻
公司动态
行业资讯
关于
案例
联系
当电脑鼠标历经报表数据信息行时色调不一样且
2021-03-07 03:11
jianzhan
拷贝编码
编码以下:
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf⑻" />
<link href="table.css" type="text/css" rel="stylesheet" />
<title>table test</title>
<!-- <style>
table tbody tr:hover{
background-color: #EEECEB;
}
</style> -->
</head>
<body>
<table>
<tr>
<th>名字</th>
<th>性別</th>
<th>班级</th>
</tr>
<tbody>
<tr>
<td>名字</td>
<td>男</td>
<td>测算机科学研究与技术性1班</td>
</tr>
<tr>
<td>段萌</td>
<td>男</td>
<td>软工1班</td>
</tr>
<tr>
<td>段萌</td>
<td>男</td>
<td>软工1班</td>
</tr>
<tr>
<td>段萌</td>
<td>男</td>
<td>软工1班</td>
</tr>
<tr>
<td>段萌</td>
<td>男</td>
<td>软工1班</td>
</tr>
</tbody>
</table>
</body>
/*
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
/*
Created on : 2014⑺⑼, 14:24:31
Author : Administrator
*/
body{ margin:0 auto; text-align:center}
/*设定表头的margin为0则表垂直居中显示信息,border为0则无垠界*/
table{margin:0 auto;
border:0px;
solid:#000
}
/*设定th表头的特性,font-weight为bold则显示信息为黑粗*/
table tr th{ height:28px;
width: auto;
line-height:28px;
background:#999;
font-weight:bold
}
table tbody tr{
height:28px;
line-height:28px;
text-align:center;
background:#FFF;
vertical-align:middle;
}
/*
*设定电脑鼠标历经色调的转变
*/
/*选用csss的这个方式,得到单数行,让后设定其特性,这样防止应用expression这个非常容易错误的方式*/
table tbody tr:nth-child(odd){
background-color: #DEDEDE
}
table tbody tr:hover{
background-color: #CCCCCC;
}
为您推荐
当电脑鼠标历经报表数据信息行时色调不
网站代运营 网站运营內容是怎样升级
挑选Google重要字广告宣传的缘故
浅析CSS 特性当中常常出現的百分比
为什么加盟代理代理商逐浪手机软件方式
所有文章
公司动态
行业资讯