1. 區(qū)塊元素
1.1. 標(biāo)題
1.1.1. 類Setext形式
使用方式
使用底線的形式宙地,用 = 和 - 表示一二階標(biāo)題掸茅,如:
This is an H1
===
This is an H2
---
(= 和 - 的個(gè)數(shù)沒(méi)有限制)
效果:
This is an H1
This is an H2
1.1.2 類Atx形式
使用方式
在行首插入1~6個(gè)#咙好,對(duì)應(yīng)標(biāo)題1到6階,注意#后應(yīng)保持一個(gè)空格
# H1
## H2
### H3
#### H4
##### H5
###### H6
效果:
H1
H2
H3
H4
H5
H6
1.2. 區(qū)塊
使用方式
在行首插入>表示區(qū)塊引用帖渠,注意>后應(yīng)保持一個(gè)空格,如:
> This is an Blockquotes,
> this is an another Blockquotes.
或者只在整個(gè)段落的第一行最前面加入>棵红,如:
>This is an Blockquotes,
>this is an another Blockquotes.
當(dāng)然胀糜,>也可嵌套使用,不過(guò)很少看到如此使用的= =缕坎,如:
> This is an Blockquotes,
>>This is an inner Blockquotes.
效果:
This is an Blockquotes,
this is an another Blockquotes.
嵌套使用:
This is an Blockquotes,This is an inner Blockquotes.
1.3. 列表
1.3.1. 有序列表
使用方式
使用數(shù)字后接一個(gè)英文句點(diǎn)(英文句點(diǎn)后保持一個(gè)空格)怖侦,如:
1. item1
2. item2
3. item3
注意:目前只有第一個(gè)序號(hào)會(huì)影響從幾號(hào)開始,其余數(shù)字不影響序號(hào)谜叹,無(wú)需考慮數(shù)字的正確性匾寝,如:
2. item1
9. item2
10. item3
列表項(xiàng)目標(biāo)記后面接1~3個(gè)空格,同時(shí)也支持一個(gè)項(xiàng)目下多個(gè)段落荷腊,此時(shí)每個(gè)項(xiàng)目下的段落必須縮進(jìn)4個(gè)空格旗吁,如:
1. This is a list item with two paragraphs. Lorem ipsum dolor
sit amet, consectetuer adipiscing elit. Aliquam hendrerit
mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet
vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
sit amet velit.
2. Suspendisse id sem consectetuer libero luctus adipiscing.
也可以插入引用(4個(gè)空格+>)或者代碼塊(8個(gè)空格),可簡(jiǎn)單記為:4個(gè)空格額外加上正常的使用方式停局。
效果:
- item1
- item2
- item3
- item1
- item2
- item3
-
This is a list item with two paragraphs. Lorem ipsum dolor
sit amet, consectetuer adipiscing elit. Aliquam hendrerit
mi posuere lectus.Vestibulum enim wisi, viverra nec, fringilla in, laoreet
vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.
-
This is a list item with two paragraphs. Lorem ipsum dolor
sit amet, consectetuer adipiscing elit. Aliquam hendrerit
mi posuere lectus.Vestibulum enim wisi, viverra nec, fringilla in, laoreet
vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
sit amet velit. Suspendisse id sem consectetuer libero luctus adipiscing.
1.3.2. 無(wú)序列表
使用方式
使用*很钓、+香府、-作為列表標(biāo)記,其結(jié)果相同码倦,如:
* Item1
* Item2
* Item3
+ Item1
+ Item2
+ Item3
- Item1
- Item2
- Item3
效果:
- Item1
- Item2
- Item3
1.4. 代碼區(qū)塊
使用方式
縮進(jìn)4個(gè)空格企孩,代碼區(qū)塊會(huì)一直持續(xù)到?jīng)]有所進(jìn)的那一行,或者文件結(jié)尾袁稽,如:
Here is an example of Script:
printf("Hello world");
或者使用封閉的``` ```生成代碼塊
效果:
1.5. 分割線
使用方式
在一行中用三個(gè)以上的*勿璃,-,-來(lái)建立一個(gè)分割線推汽,行內(nèi)無(wú)其他東西补疑。符號(hào)間允許空格出現(xiàn),如
***
* * *
---
- - -
效果:
2. 區(qū)段元素
2.1. 鏈接
2.1.1 行內(nèi)式鏈接
使用方式
連接文字使用[]來(lái)標(biāo)記歹撒,在[]后面緊接著()并插入網(wǎng)址鏈接莲组,同時(shí)可通過(guò)在網(wǎng)址后面用"title"方式來(lái)加入標(biāo)題,如:
This is [baidu](http://www.baidu.com/ "百度") in link.
同時(shí)可以通過(guò)相對(duì)路徑來(lái)連接到同樣主機(jī)的資源暖夭,如:
See my [About](/about/) page for details.
效果
This is baidu in link.
See my About page for details.
2.1.2 參考式鏈接
使用方式
在鏈接文字的()后面在街上另一個(gè)[]锹杈,而在第二個(gè)[]里面填入用以辨識(shí)鏈接的標(biāo)記:
This is [百度] [id] reference-style link.
接著在文件的任意處,把這個(gè)標(biāo)記的鏈接內(nèi)容定義出來(lái):
[id]: http://www.baidu.com "百度"
鏈接內(nèi)容定義的格式如下:
1. [連接文字](前面至多加入3個(gè)空格)
2. :冒號(hào)
3. 一個(gè)以上的空格
4. 鏈接的網(wǎng)址(可選擇是否用<>包起來(lái))
5. 選擇性的接著title內(nèi)容迈着,“title”或‘title’或(title)
注意:鏈接辨識(shí)標(biāo)簽不區(qū)分大小寫
另外竭望,在第二個(gè)[]為空時(shí),這種情形下裕菠,鏈接標(biāo)記會(huì)等同于鏈接文字咬清,如
[baidu] []
[baidu]: http://www.baidu.com/
效果
This is 百度 reference-style link.
2.2. 強(qiáng)調(diào)
使用方式
使用封閉的*或者_(dá)作為強(qiáng)調(diào)字詞的符號(hào),使用封閉的~~加入刪除線奴潘,如:
*傾斜*
_傾斜_
**加粗**
__加粗__
***傾斜+加粗***
___傾斜+加粗___
~~刪除線~~
注意:如果要輸入普通的*號(hào)枫振,則需要輸入\*
效果
傾斜
傾斜
加粗
加粗
傾斜+加粗
傾斜+加粗
刪除線
2.3. 代碼
使用方式
標(biāo)記一小段行內(nèi)代碼:
用封閉的反引號(hào)`some code`,如:
Use the `printf()` function
在代碼區(qū)段中插入反引號(hào)萤彩,用多個(gè)反引號(hào)來(lái)開啟和結(jié)束代碼區(qū)段粪滤,如:
``There is a literal backtick (`) here.``
效果
Use the printf
function
There is a literal backtick (`) here.
2.4. 圖片
2.4.1 行內(nèi)式
使用方式
行內(nèi)式的圖片語(yǔ)法看起來(lái)類似于:
![Alt text](/path/to/img.jpg)
![Alt text](/path/to/img.jpg "Optional title")
詳細(xì)描述:
![圖片的替代文字](圖片網(wǎng)址 “Optional title”)
2.4.2 參考式
使用方式
參考式的圖片語(yǔ)法:
![Alt text][id]
[id]: url/to/image "optional title attribute"
詳細(xì)描述:
![圖片的替代文字][id]
[id]: 圖片網(wǎng)址 "Optional title attribute"
3. 其他
3.1. 反斜杠
使用方式
Markdown利用反斜杠\來(lái)幫助插入普通的符號(hào)
\ 反斜線
` 反引號(hào)
* 星號(hào)
_ 底線
{} 花括號(hào)
[] 方括號(hào)
() 括弧
# 井字號(hào)
+ 加號(hào)
- 減號(hào)
. 英文句點(diǎn)
! 驚嘆號(hào)
3.2. 自動(dòng)鏈接
使用方式
Markdown支持以比較簡(jiǎn)短的自動(dòng)鏈接形式來(lái)處理網(wǎng)址和電子郵件信箱,用封閉的<>包起來(lái)雀扶,如:
<http://www.baidu.com>
效果
3.3. 表格
使用方式
注: : 代表對(duì)齊方式 ,** : 與 | 之間不要有空格**杖小,否則對(duì)齊會(huì)有些不兼容
| a | b | c |
|:-------:|:------------- | ----------:|
| 居中 | 左對(duì)齊 | 右對(duì)齊 |
|=========|===============|============|
或者簡(jiǎn)約寫法
a | b | c
:-:|:- |-:
居中 | 左對(duì)齊 | 右對(duì)齊
============|=================|=============
效果
a | b | c |
---|---|---|
居中 | 左對(duì)齊 | 右對(duì)齊 |
============ | ============ | ============ |
3.4 注釋
使用方式
Android[^1]
[^1]: Android是Google開源的手機(jī)操作系統(tǒng)
注意:文章最后面顯示注釋
效果
Markdown[1]
3.5 流程圖、時(shí)序圖愚墓、側(cè)邊欄予权、導(dǎo)航
對(duì)于圖而言,莫不如采用visio(win)工具
而側(cè)邊欄和導(dǎo)航等浪册,需要采用模板扫腺,原生貌似不支持,因此也不多做說(shuō)明村象。需要的可自行百度笆环。
END
-
Android是Google開源的手機(jī)操作系統(tǒng) ?