Markdown之表格table的處理,markdown表格table

來源:互聯網
上載者:User

Markdown之表格table的處理,markdown表格table

插入表格代碼如下:

<table class="table table-bordered table-striped table-condensed">    <tr>        <td>北京</td><td>霧霾</td>    </tr>    <tr>        <td>深圳</td><td>暴雨</td>    </tr></table>
發現table加了個class屬性,如果只是table標籤 將不起作用。

table-bordered:帶圓角邊框和豎線

table-striped:奇偶行顏色不同

table-condensed:壓縮行距


除了以上另外還有其他可供選擇:

1、如果需要表頭跟內容不一樣,可以將<td>表頭內容</td>換成<th>表頭內容</th>。

2、如果表格內文需要換行,可以在要換行的內容後加入<br>,後面的內容就會跑到下一行。

3、如果內文中有代碼,需要特別顯示,可使用:<code>代碼</code>。

4、如果表格中有需要設為斜體的內容,可使用:<I>要設為斜體的內容</I>。

5、如果有跨行或者跨列的儲存格,可用<th colspan="跨列數">內容</th>或rowspan。

6、如果要調整某一列的寬度,可使用:<th width="寬度值或百分比">表頭內容</th>。


最後效果如下:


作者:itmyhome


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.