CSS 鼠标经过时改变table所在行的颜色

    <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 οnmοuseοver="style.backgroundColor='#FF9900'" οnmοuseοut="style.backgroundColor='#FFFFFF'">  
    <td>Apple</td>  
    <td>Steven Jobs</td>  
    <td>USA</td>  
    </tr>  
      
    <tr class="alt">  
    <td>Baidu</td>  
    <td>Li YanHong</td>  
    <td>China</td>  
    </tr>  
      
    <tr οnmοuseοver="style.backgroundColor='#FF9900'" οnmοuseοut="style.backgroundColor='#FFFFFF'">  
    <td>Google</td>  
    <td>Larry Page</td>  
    <td>USA</td>  
    </tr>  
      
    <tr class="alt" οnmοuseοver="style.backgroundColor='#FF9900'" οnmοuseοut="style.backgroundColor='#FFFFFF'">  
    <td>Lenovo</td>  
    <td>Liu Chuanzhi</td>  
    <td>China</td>  
    </tr>  
      
    <tr οnmοuseοver="style.backgroundColor='#FF9900'" οnmοuseοut="style.backgroundColor='#FFFFFF'">  
    <td>Microsoft</td>  
    <td>Bill Gates</td>  
    <td>USA</td>  
    </tr>  
      
    <tr class="alt" οnmοuseοver="style.backgroundColor='#FF9900'" οnmοuseοut="style.backgroundColor='#FFFFFF'">  
    <td>Nokia</td>  
    <td>Stephen Elop</td>  
    <td>Finland</td>  
    </tr>  
      
      
    </table>  
    </body>  
    </html>  


<dt style="list-style: none; word-break: break-all; word-wrap: break-word; margin: 0px; padding: 4px 0px 0px 7px; float: left; width: 77px; height: 60px; font-family: Verdana, 'Lucida Grande', Arial, Helvetica, sans-serif;"><a target=_blank href="http://my.csdn.net/" style="list-style: none; text-decoration: none; word-break: break-all; word-wrap: break-word; color: rgb(59, 89, 152); margin: 0px; padding: 0px;"><img src="http://avatar.csdn.net/2/A/1/3_u011447828.jpg" alt="u011447828" style="list-style: none; word-break: break-all; word-wrap: break-word; border: none; margin: 0px; padding: 0px; width: 48px; height: 48px;" /></a></dt><dd style="list-style: none; word-break: break-all; word-wrap: break-word; margin: 0px 0px 0px -10px; padding: 4px 0px 0px; float: left; width: 500px; font-family: Verdana, 'Lucida Grande', Arial, Helvetica, sans-serif;"><ul style="list-style: none; word-break: break-all; word-wrap: break-word; margin: 0px; padding: 0px;"><li class="user_name" style="list-style: none; word-break: break-all; word-wrap: break-word; margin: 0px; padding: 0px; font-stretch: normal; font-size: 14px; line-height: 24px; font-family: Arial, Helvetica, sans-serif;"><a target=_blank href="http://my.csdn.net/" class="user_name" style="list-style: none; text-decoration: none; word-break: break-all; word-wrap: break-word; color: rgb(68, 68, 68); margin: 0px 1em 0px 0px; padding: 0px; font-weight: bold; font-stretch: normal;">afterrains</a><span style="list-style: none; word-break: break-all; word-wrap: break-word; margin: 0px; padding: 0px; color: rgb(58, 156, 211);">别在熬夜了!</span></li><li class="feed_link" style="list-style: none; word-break: break-all; word-wrap: break-word; margin: 0px 0px 0px -5px; padding: 0px; color: rgb(170, 170, 170); font-stretch: normal; line-height: 24px; font-family: Arial, Helvetica, sans-serif;"><a target=_blank href="http://my.csdn.net/" style="list-style: none; text-decoration: none; word-break: break-all; word-wrap: break-word; color: rgb(7, 81, 154); margin: 0px 6px; padding: 0px;">个人主页</a>|<a target=_blank href="http://blog.csdn.net/u011447828" style="list-style: none; text-decoration: none; word-break: break-all; word-wrap: break-word; color: rgb(7, 81, 154); margin: 0px 6px; padding: 0px;">我的博客</a></li></ul></dd>
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值