1. 程式人生 > >CSS設定表格細邊框

CSS設定表格細邊框

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>表格簡單操作</title>
    <style type="text/css">
        #tbl{border-collapse:collapse;border-left:1px solid #66BDFF;border-top:1px solid #66BDFF;}
        #tbl th,td{border-collapse:collapse;border-right:1px solid #66BDFF;border-bottom

:1px solid #66BDFF;padding:10px;}
    </style>
</head>
<body>
    <table id="tbl">
        <thead>
            <tr>
                <th>姓名</th>
                <th>年齡</th>
                <th>性別</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>羅納爾多</td>
                <td>38</td>
                <td>男</td>
            </tr>
            <tr>
                <td>裡瓦爾多</td>
                <td>41</td>
                <td>男</td>
            </tr>
            <tr>
                <td>貝克漢姆</td>
                <td>38</td>
                <td>男</td>
            </tr>
        </tbody>
    </table>
</body>
</html>