Markdown 樣式美化大全


Markdown 樣式大全

記錄用過,但不常用的 MD 樣式語法。

1. 鍵盤

A

<kbd>Backspace</kbd>

2. 路徑

/usr/local/nginx/sbin/nginx

<span style="color:#4185c4;">/usr/local/nginx/sbin/nginx</span>

3. 彩色字體背景

Nginx is not running !

<b style="color:red;">Nginx&nbsp;is&nbsp;not&nbsp;running&nbsp;!</b>

Nginx is running !

<b style="color:green;">Nginx&nbsp;is&nbsp;running&nbsp;!</b>

 Nginx is running ! 

<b style="background-color:green;color:white;"> Nginx is running ! </b>

4. 折疊

展開查看內容 這是展開后的內容。
<details>
 <summary>展開查看內容</summary>
 這是展開后的內容。
</details>

5. 錨點鏈接

在 Typora 中,按住Ctrl+鼠標左鍵 進行跳轉。

  • Markdown 原始寫法 [名稱](#id)

    原生錨點1

    原生錨點2

    跳轉到原生錨點1
    跳轉到原生錨點2

    ### 原生錨點1
    
    ### 原生錨點2
    
    [跳轉到原生錨點1](#原生錨點1)
    [跳轉到原生錨點2](#原生錨點2)
    

    如果有重復的標題,從 開始添加編號后綴-1,例如:

    Hello

    ...

    Hello

    ...

    A link to first header, a link to second one.

    # Hello
    
    ...
    
    # Hello
    
    ...
    
    A [link](#hello-1) to first header, a [link](#hello-2) to second one.
    
  • HTML 語法 <a href="#id">名稱</a>

    titleA

    titleB

    to titleA
    to titleA

    <h3 id="titleA">titleA</h3><h3 id="titleB">titleB</h3>[to titleA](#titleA)[to titleA](#titleB)
    

6. 待辦列表

    • [ ] 記得找個女朋友
    • [ ] 天涼了,記得加衣喔
      • [x] 今日份單詞打卡
      • [x] 了解tree shaking和dce
1. - [ ] 記得找個女朋友2. - [ ] 天涼了,記得加衣喔   1. - [x] 今日份單詞打卡   2. - [x] 了解tree shaking和dce

7. 腳注

你好[1]

你好[^腳注][^腳注]: 這是一個腳注

8.自定義列表

image-20210713162838715

Credits: John: MikeUI Designer: Xiao Ming

Typora 暫不支持。

9. 復雜表格

Markdown 絕大多數編輯器都是支持 html 語言,Markdown 本身不支持復雜的表格,所以使用 html 來編輯即可。

  • 使用跨行或者跨列時,使用 th 標簽
  • 跨行: rowspan 的的參數就是要跨的行數
  • 跨列: colspan 的參數就是要跨的列數
真實情況 預測結果
正例 反例
正例 TP(真正例) FN(假反例)
反例 FP(假正例) TN(真反例)
<table align="center">
    <tr>
        <th rowspan="2">真實情況</th>
        <th colspan="2">預測結果</th>
    </tr>
    <tr>
        <td>正例</td>
        <td>反例</td>
    </tr>
    <tr>
        <td>正例</td>
        <td>TP(真正例)</td>
        <td>FN(假反例)</td>
    </tr>
    <tr>
        <td>反例</td>
        <td>FP(假正例)</td>
        <td>TN(真反例)</td>
    </tr>
</table>

10. 文本高亮

…… 海森堡在 1927 年首先提出 ……

…… <mark>海森堡在 1927 年首先提出</mark> ……

注意:文檔編寫使用的是 Typora,部分效果博客園未支持。


  1. 這是一個腳注 ↩︎


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM