博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
鼠标经过时 表格行的背景色更改
阅读量:4496 次
发布时间:2019-06-08

本文共 1407 字,大约阅读时间需要 4 分钟。

<html>

<head>
<style type="text/css">
#customers
{
font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
width:100%;
border-collapse:collapse;
}
#customers td, #customers th
{
font-size:1em;
border:1px solid #98bf21;
padding:3px 7px 2px 7px;
}
#customers th
{
font-size:1.1em;
text-align:left;
padding-top:5px;
padding-bottom:4px;
background-color:#A7C942;
color:#ffffff;
}
</style>
</head>
<body>
<table id="customers">
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr onMouseOver="style.backgroundColor='#FF9900'" onMouseOut="style.backgroundColor='#FFFFFF'">
<td>Apple</td>
<td>Steven Jobs</td>
<td>USA</td>
</tr>
<tr class="alt" onMouseOver="style.backgroundColor='#FF9900'" onMouseOut="style.backgroundColor='#FFFFFF'">
<td>Baidu</td>
<td>Li YanHong</td>
<td>China</td>
</tr>
<tr onMouseOver="style.backgroundColor='#FF9900'" onMouseOut="style.backgroundColor='#FFFFFF'">
<td>Google</td>
<td>Larry Page</td>
<td>USA</td>
</tr>
<tr class="alt" onMouseOver="style.backgroundColor='#FF9900'" onMouseOut="style.backgroundColor='#FFFFFF'">
<td>Lenovo</td>
<td>Liu Chuanzhi</td>
<td>China</td>
</tr>
<tr onMouseOver="style.backgroundColor='#FF9900'" onMouseOut="style.backgroundColor='#FFFFFF'">
<td>Microsoft</td>
<td>Bill Gates</td>
<td>USA</td>
</tr>
<tr class="alt" οnmοuseοver="style.backgroundColor='#FF9900'" o

转载于:https://www.cnblogs.com/something/archive/2013/05/26/3100085.html

你可能感兴趣的文章
druid监控配置
查看>>
css颜色代码大全
查看>>
物理系统(二)
查看>>
css3中-moz、-ms、-webkit与盒子模型
查看>>
DataTable 整行为空时,去除空行,常用于Excel导入,转换为DataTable时出现
查看>>
网络相关面试题1
查看>>
一种让谷歌搜索引擎拒绝搜索的字符串
查看>>
实现毛玻璃效果
查看>>
[BZOJ4082][Wf2014]Surveillance[倍增]
查看>>
kill -9杀掉nginx主进程、reload失败解决办法
查看>>
objdump 用法
查看>>
前端js模糊搜索(模糊查询)
查看>>
Chrome的hack写法以及CSS的支持程度图示
查看>>
苹果端手机微信页面长按图片无法保存的解决方案
查看>>
SVN、GIT比较
查看>>
asp后台读id设置样式
查看>>
POJ 3744 Scout YYF I 概率DP+矩阵快速幂 好题
查看>>
Training Logisches Denken
查看>>
谁分配谁释放
查看>>
正则表达式
查看>>