Css基本スタイル――――総合設計:表の作成

1014 ワード

<table id="tb">
    <tr>
        <th>  </th>
        <th>  </th>
        <th>  </th>
    </tr>
    <tr>
        <td>  </td>
        <td>20</td>
        <td> </td>
    </tr>
    <tr class="alt">
        <td>  </td>
        <td>20</td>
        <td> </td>
    </tr>
    <tr>
        <td>  </td>
        <td>20</td>
        <td> </td>
    </tr>
    <tr class="alt">
        <td>  </td>
        <td>20</td>
        <td> </td>
    </tr>
</table>





#tb{
    border-collapse: collapse;
    width: 500px;
}
#tb td,#tb th{
    border: 1px solid bisque;
    padding: 5px;
}
#tb th{
    text-align: left;
    background-color: aqua;
    color: #ffffff;
}
#tb tr.alt td{
    color: black;
    background-color: aquamarine;
}