1.模板一

各种样式的table 及 代码

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style>    
            *{
                margin: 0;padding: 0;
            }
            body {
                font-family: Georgia, serif;
                font-size: 20px;
                font-style: italic;
                font-weight: normal;
                letter-spacing: normal;
                background: #f0f0f0;
            }
            #content {
                background-color: #fff;
                width: 750px;
                padding: 40px;
                margin: 0 auto;
                margin: 0px auto;
                -moz-box-shadow: 0px 0px 16px #aaa;
            }
            .head {
                font-family: Helvetica, Arial, Verdana;
                text-transform: uppercase;
                font-weight: bold;
                font-size: 12px;
                font-style: normal;
                letter-spacing: 3px;
                color: #888;
                border-bottom:3px solid #f0f0f0;
                padding-bottom: 10px;
                margin-bottom: 10px;
            }
            .head a {
                color: #1D81B6;
                text-decoration:none;
                float:right;
                text-shadow:1px 1px 1px #888;
            }
            .head a: hover {
                color: #f0f0f0;
            }
            #content h1 {
                font-family: "Trebuchet MS", sans-serif;
                color: #1D81B6;
                font-weight:normal;
                font-style:normal;
                font-size:56px;
                text-shadow:1px 1px 1px #aaa;
            }
        </style>
        <style>
            /* Table 1 Style */
            table.table1{
                font-family: "Trebuchet MS", sans-serif;
                font-size: 16px;
                font-weight: bold;
                line-height: 1.4em;
                font-style: normal;
                border-collapse:separate;
            }
            .table1 thead th{
                padding:15px;
                color:#fff;
                text-shadow:1px 1px 1px #568F23;
                border:1px solid #93CE37;
                border-bottom:3px solid #9ED929;
                background-color:#9DD929;
                background:-webkit-gradient(
                    linear,
                    left bottom,
                    left top,
                    color-stop(0.02, rgb(123,192,67)),
                    color-stop(0.51, rgb(139,198,66)),
                    color-stop(0.87, rgb(158,217,41))
                    );
                background: -moz-linear-gradient(
                    center bottom,
                    rgb(123,192,67) 2%,
                    rgb(139,198,66) 51%,
                    rgb(158,217,41) 87%
                    );
                -webkit-border-top-left-radius:5px;
                -webkit-border-top-right-radius:5px;
                -moz-border-radius:5px 5px 0px 0px;
                border-top-left-radius:5px;
                border-top-right-radius:5px;
            }
            .table1 thead th:empty{
                background:transparent;
                border:none;
            }
            .table1 tbody th{
                color:#fff;
                text-shadow:1px 1px 1px #568F23;
                background-color:#9DD929;
                border:1px solid #93CE37;
                border-right:3px solid #9ED929;
                padding:0px 10px;
                background:-webkit-gradient(
                    linear,
                    left bottom,
                    right top,
                    color-stop(0.02, rgb(158,217,41)),
                    color-stop(0.51, rgb(139,198,66)),
                    color-stop(0.87, rgb(123,192,67))
                    );
                background: -moz-linear-gradient(
                    left bottom,
                    rgb(158,217,41) 2%,
                    rgb(139,198,66) 51%,
                    rgb(123,192,67) 87%
                    );
                -moz-border-radius:5px 0px 0px 5px;
                -webkit-border-top-left-radius:5px;
                -webkit-border-bottom-left-radius:5px;
                border-top-left-radius:5px;
                border-bottom-left-radius:5px;
            }
            .table1 tfoot td{
                color: #9CD009;
                font-size:32px;
                text-align:center;
                padding:10px 0px;
                text-shadow:1px 1px 1px #444;
            }
            .table1 tfoot th{
                color:#666;
            }
            .table1 tbody td{
                padding:10px;
                text-align:center;
                background-color:#DEF3CA;
                border: 2px solid #E7EFE0;
                -moz-border-radius:2px;
                -webkit-border-radius:2px;
                border-radius:2px;
                color:#666;
                text-shadow:1px 1px 1px #fff;
            }
            .table1 tbody span.check::before{
                content : url(images/check0.png)
            }
        </style>
    </head>
    <body>
        <div id="content">
            
            <table class="table1">
                <thead>
                    <tr>
                        <th></th>
                        <th scope="col" abbr="Starter">Smart Starter</th>
                        <th scope="col" abbr="Medium">Smart Medium</th>
                        <th scope="col" abbr="Business">Smart Business</th>
                        <th scope="col" abbr="Deluxe">Smart Deluxe</th>
                    </tr>
                </thead>
                <tfoot>
                    <tr>
                        <th scope="row">Price per month</th>
                        <td>$ 2.90</td>
                        <td>$ 5.90</td>
                        <td>$ 9.90</td>
                        <td>$ 14.90</td>
                    </tr>
                </tfoot>
                <tbody>
                    <tr>
                        <th scope="row">Storage Space</th>
                        <td>512 MB</td>
                        <td>1 GB</td>
                        <td>2 GB</td>
                        <td>4 GB</td>
                    </tr>
                    <tr>
                        <th scope="row">Bandwidth</th>
                        <td>50 GB</td>
                        <td>100 GB</td>
                        <td>150 GB</td>
                        <td>Unlimited</td>
                    </tr>
                    <tr>
                        <th scope="row">MySQL Databases</th>
                        <td>Unlimited</td>
                        <td>Unlimited</td>
                        <td>Unlimited</td>
                        <td>Unlimited</td>
                    </tr>
                    <tr>
                        <th scope="row">Setup</th>
                        <td>19.90 $</td>
                        <td>12.90 $</td>
                        <td>free</td>
                        <td>free</td>
                    </tr>
                    <tr>
                        <th scope="row">PHP 5</th>
                        <td><span class="check"></span></td>
                        <td><span class="check"></span></td>
                        <td><span class="check"></span></td>
                        <td><span class="check"></span></td>
                    </tr>
                    <tr>
                        <th scope="row">Ruby on Rails</th>
                        <td><span class="check"></span></td>
                        <td><span class="check"></span></td>
                        <td><span class="check"></span></td>
                        <td><span class="check"></span></td>
                    </tr>
                </tbody>
            </table>
        
        </div>
    </body>
</html>
template-1

相关文章: