【CSS學習筆記】整齊的表格

來源:互聯網
上載者:User

標籤:doctype   課程   行合并   1.0   nbsp   bsp   時間   相互   筆記   

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<title>第37課 整齊的表格</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="布爾教育 http://www.itbool.com" />
<style type="text/css">
    table{
        border-collapse: collapse;
        /*邊框融合,邊框之間不存在空隙*/
        /*border-collapse: separate;
        邊框之間相互獨立*/
        /*border-spacing: 20px;
        邊框之間相距20像素,比較寬,不美觀,一般是在separate的狀態下使用*/
    }
    td{
        border:5px solid blue;
    }
</style>
</head>
    <body>
        <table>
            <tr>
                <td colspan="4">1(4列合并成1列)</td>
            </tr>
            <tr>
                <td>21</td>
                <td>22</td>
                <td>23</td>
                <td rowspan="2">24(2行合并1行)</td>
            </tr>
            <tr>
                <td>31</td>
                <td>32</td>
                <td>33</td>
            </tr>
        </table>
    </body>
</html>

 

作業:製作課程表

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<title>第37課 製作課程表</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="布爾教育 http://www.itbool.com" />
<style type="text/css">
    table{
        border-collapse: collapse;
    }
    td{
        width: 100px;
        height: 25px;
        border:1px solid black;
    }
</style>
</head>
    <body>
        <table>
            <tr>
                <td>時間日期</td>
                <td>1</td>
                <td>2</td>
                <td>3</td>
                <td>4</td>
                <td>5</td>
            </tr>
            <tr>
                <td rowspan="2">上午時間</td>
                <td>語文</td>
                <td>地理</td>
                <td>代數</td>
                <td></td>
                <td></td>
            </tr>
            <tr>
        
                <td>語文</td>
                <td>地理</td>
                <td>代數</td>
                <td></td>
                <td></td>
            </tr>
            <tr>
                <td colspan="6"></td>
            </tr>
            <tr>
                <td rowspan="2">下午時間</td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
            </tr>
            <tr>

                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
            </tr>
        </table>
    </body>
</html>

【CSS學習筆記】整齊的表格

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.