Home  >  Article  >  Web Front-end  >  Comprehensive design of CSS basic styles: detailed introduction to table production

Comprehensive design of CSS basic styles: detailed introduction to table production

高洛峰
高洛峰Original
2017-03-26 11:22:311487browse

This article mainly provides you with an in-depth analysis of the comprehensive design of CSS basic styles: the detailed introduction of table production and related information, which has certain reference value. Interested friends can refer to it

<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;
}

The above is the detailed content of Comprehensive design of CSS basic styles: detailed introduction to table production. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn