zoukankan      html  css  js  c++  java
  • 隔行换色table

    <style type="text/css">
    table
    {
    margin: 0 auto;
    600px;
    }
    table
    {
    border: 1px solid #000;
    }
    table tr th
    {
    height: 28px;
    line-height: 28px;
    background: #999;
    }
    table.stripe tr td
    {
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: #FFF;
    vertical-align: middle;
    }
    /* 默认背景被白色 */
    table.stripe tr.alt td
    {
    background: #F2F2F2;
    }
    /* 默认隔行背景颜色 */
    table.stripe tr.over td
    {
    background: #EEECEB;
    }
    /* 鼠标经过时候背景颜色 */

    </style>
    <script type="text/javascript">
    $(document).ready(function () {

    $(".stripe tr").mouseover(function () {
    $(this).addClass("over");
    }).mouseout(function () {
    $(this).removeClass("over");
    })
    $(".stripe tr:even").addClass("alt");

    });

    </script>

    <table id="table" class="stripe">
    <tr>
    <td>
    活动主题
    </td>
    <td>
    获得
    </td>
    </tr>
    <tr>
    <td>
    活动主题
    </td>
    <td>
    </td>
    </tr>
    <tr>
    <td>
    活动主题
    </td>
    <td>
    </td>
    </tr>
    </table>

  • 相关阅读:
    变量1
    PHP 函数
    发送post请求
    XXE
    CSRF
    Html基础
    暴力破解
    Brup sute
    XSS
    URL 传参转义 (特殊符号转义)
  • 原文地址:https://www.cnblogs.com/Xujg/p/4059486.html
Copyright © 2011-2022 走看看