zoukankan      html  css  js  c++  java
  • 鼠标经过时 表格行的背景色更改

    <html>
    <head>
    <style type="text/css">
    #customers
    {
    font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
    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" onmouseover="style.backgroundColor='#FF9900'" o

  • 相关阅读:
    三、Pandas入门
    二、NumPy入门
    jQuery模拟angular的数据绑定
    ajax里的getJSON的用法
    SQL中关于传递参数为Null的示例
    原生ajax示例
    页面自增加示例
    angular1数据绑定例子
    angular2 工程目录结构介绍
    angular js环境配置
  • 原文地址:https://www.cnblogs.com/something/p/3100085.html
Copyright © 2011-2022 走看看