Markdown語法大全Markdown模版大全
<!--toc目錄start-->
[toc]
前言
- Markdown語法上手速度快,通過簡單的程式碼實現佈局簡約好看文字排版,完全值得上手學習,取代Work傳統文件文字編輯。
- 目前主流的文字編輯工具和部落格(開源中國、簡書、有道雲筆記、GitHub等等)都支援Markdown語法
推薦工具
工具|介紹|網址 -|-|-|- MdEditor|Markdown線上編輯器,擴充套件了Markdown功能(如表格/腳註/內嵌HTML等等)| https://github.com/pandao/editor.md Markdown Here|瀏覽器外掛,擴充套件了Markdown功能|https://markdown-here.com
語法
<font color="red" face="宋體"> 注意、注意、注意(重要的事情說三遍):Markdown支援html標籤寫法,使用方式可以參考尾部程式碼
<font color="red" face="宋體"> 注意、注意、注意(重要的事情說三遍):一般語法格式標籤+空格+內容
文字元素
- 常用操作
換行2個空格+回車
空格使用nbsp; ensp;
程式碼
特殊符號用\+符號
例如:\$
標題
- 說明:
#
與[toc]
2個程式碼配合,生成目錄效果,具體程式碼看結尾處程式碼 - 一共有6級,與
#
號對應
<table> <tr> <th>程式碼</th> <th>效果</th> </tr> <tr> <td> # 標題一 </br> ## 標題二</br> ### 標題三 </br> </td> <td></td> </tr> </table>
列表(有序/無序)
- 列表標籤可以巢狀,有序無序可以隨意搭配,當需要巢狀時,隔行用2個tab(8空格)
<table> <tr> <th>無序列表程式碼</th> <th>效果</th> </tr> <tr> <td> * 列表一</br> * 列表一</br>   *列表一 </br>   *列表一 </br> + 列表二</br> - 列表三</br> </td> <td></td> </tr> </table>
<table> <tr> <th>有序列表程式碼</th> <th>效果</th> </tr> <tr> <td> 1. 列表一</br> 2. 列表二</br> 3. 列表三</br> </td> <td></td> </tr> </table>
引用
<table> <tr> <th>程式碼</th> <th>效果</th> </tr> <tr> <td> > 引用一 </br> > 引用一 </br> >> 引用二</br> >>> 引用三</br> </td> <td></td> </tr> </table>
斜體/粗體/橫線/
<table> <tr> <th>程式碼</th> <th>效果</th> </tr> <tr> <td> *斜體* </br> _斜體_ </br> **加粗** </br> ***加粗+斜線*** </br> **_加粗+斜線**_ </br> ~~橫線~~ </br> </td> <td></td> </tr> </table>
程式碼文字
<table> <tr> <th>程式碼</th> <th>效果</th> </tr> <tr> <td> ``` </br> xxxxx xxxxx</br> xxxxx xxxxx</br> ``` </br> </td> <td></td> </tr> </table>
Task任務
x
表示玄宗
<table> <tr> <th>程式碼</th> <th>效果</th> </tr> <tr> <td> ` [ ]`</br> ` [x]`</br> </td> <td></td> </tr> </table>
分割線/分頁符
[===]
分頁符,其他分隔符
<table> <tr> <th>程式碼</th> <th>效果</th> </tr> <tr> <td> `===` </br> `---`</br> `[===]`</br> </td> <td></td> </tr> </table>
表格
:
表示對齊,:-
表示左對齊,:-:
表示居中,-:
表示右對齊
<table> <tr> <th>程式碼</th> <th>效果</th> </tr> <tr> <td> `標題1|標題2|標題3|標題4|`</br> `-|-|-:|:-`</br> `內容1|內容2|內容3|內容4`</br> </td> <td></td> </tr> </table>
註腳
- 註腳定義:
[^footnote]
,然後註腳文字:[^footnote]: 這是一個 *註腳* 的 **文字**
- 註腳效果:[^footnote]
圖片與連結
- []裡面填寫標題,()裡面填寫資源連結,例子:
![圖片](http://圖片)
<table> <tr> <th>型別</th> <th>程式碼文字程式碼</th> <th>效果</th> </tr> <tr> <td>圖片</td> <td> ![]() </br> </td> <td></td> </tr> <tr> <td>連結</td> <td> []() </br> </td> <td></td> </tr> </table>
錨
- 頁面內內容跳轉
#<span id="content">目標內容</span>
[點選跳轉目標內容](#content)
- 跳轉到其他頁面內容
#<span id="content">目標內容</span>
[點選跳轉目標內容](http://mfshi.com/content/#content)
圖示
<table> <tr> <th>程式碼</th> <th>效果</th> </tr> <tr> <td> `&#+10750;`</br> `&#+10720;`</br> `&#+1060;`</br> </td> <td> `⧾`</br> `⧠`</br> `Ф`</br></td> </tr> </table>
特殊元素
科學公式 TeX(KaTeX)
- $ 表示行內公式:
質能守恆方程可以用一個很簡潔的方程式 $E=mc^2$ 來表達。
- $$ 表示整行公式:
$$\sum_{i=1}^n a_i=0$$
$$f(x_1,x_x,\ldots,x_n) = x_1^2 + x_2^2 + \cdots + x_n^2 $$
$$\sum^{j-1}_{k=0}{\widehat{\gamma}_{kj} z_k}$$
流程圖
st=>start: Start
op=>operation: Your Operation
cond=>condition: Yes or No?
e=>end
st->op->cond
cond(yes)->e
cond(no)->op
序列圖
Alice->Bob: Hello Bob, how are you?
Note right of Bob: Bob thinks
Bob-->Alice: I am good thanks!
甘特圖
title 專案開發流程
section 專案確定
需求分析 :a1, 2016-06-22, 3d
可行性報告 :after a1, 5d
概念驗證 : 5d
section 專案實施
概要設計 :2016-07-05 , 5d
詳細設計 :2016-07-08, 10d
編碼 :2016-07-15, 10d
測試 :2016-07-22, 5d
section 釋出驗收
釋出: 2d
驗收: 3d
嵌入百度地圖
<iframe src="http://118.25.75.221/map2.html" width="600" height="300" frameborder="0" scrolling="no"></iframe>
嵌入Bilibili視訊
<iframe src="//player.bilibili.com/player.html?aid=35094580&cid=61487124&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true" width="600" height="300"> </iframe>
說明
<table> <tr> <th>標題</th> <th>連結</th> </tr> <tr> <td> 基本語法 </td> <td><https://www.zybuluo.com/mdeditor?url=https://www.zybuluo.com/static/editor/md-help.markdown#fn:footnote2></td> </tr> </table>
[^footnote]: 這是一個 註腳 的 文字。
<