markdown模式通常用于 代碼的全篇注釋?zhuān)琺arkdown文件的后綴名為.md , 現(xiàn)在來(lái)說(shuō)說(shuō)markdown的一些基本用法卖词。
標(biāo)題的大小
- 標(biāo)題大小只需要在文字錢(qián)加上 # 符號(hào)即可(注意空格) #的個(gè)數(shù)即為標(biāo)題文字大小。例如:
最小標(biāo)題 6個(gè)#字符,
最小標(biāo)題 5個(gè)#字符崩溪,
最小標(biāo)題 4個(gè)#字符拭嫁,
最小標(biāo)題 3個(gè)#字符葱椭,
最小標(biāo)題 2個(gè)#字符鸿秆,
最大標(biāo)題 1個(gè)#字符,
無(wú)序列表(##)
- 簡(jiǎn)書(shū)無(wú)序列表只需要在文字加上 - 即可實(shí)現(xiàn)
- 我是無(wú)序列表1
- 我是無(wú)序列表2
有序列表
- 我只需要在文字開(kāi)始位置 輸入序列號(hào) 1. 即可(注意空格)
- 我是有序列表2
鏈接和圖片 (提示 轉(zhuǎn)義符號(hào)為" \")
鏈接 [簡(jiǎn)書(shū)](www.reibang.com)
簡(jiǎn)書(shū)-
圖片 ![](http://XXXX.jpg)
引用 (提示 轉(zhuǎn)義符號(hào)為" >")
-只需要在文字前加入 > 即可
白日依山盡
黃河入海流
欲窮千里目
更上一層樓
粗體 斜體
- 斜體:只需要將文字用 * 符號(hào)包裹帚稠,粗體: 用 ** 包裹
我是用*包裹的斜體
我是用** 包裹的粗體
表格
- 在表頭部分 表格默認(rèn)左對(duì)齊 右對(duì)齊需要在單元格右邊加 : ,居中對(duì)齊 則兩端加入 : 即可 如圖
| Tables | Are | Cool |
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
Tables | Are | Cool | |
---|---|---|---|
col 3 is | right-aligned | $1600 | |
col 2 is | centered | $12 | |
zebra stripes | are neat | $1 | |
col 2 is | centered | $12 |
代碼引用
- css的代碼片段 markdown支持代碼高亮顯示
```css
div{ color:red; }
```
div{ color:red; }
`` div{ color:red; }`` 的寫(xiě)法可以凸顯代碼樣式 谣旁,但是沒(méi)有顏色區(qū)分,舉個(gè)栗子滋早,如下:
div{ color:red; }
- html的代碼片段
```html
<div style='color:red;'>這是簡(jiǎn)書(shū)中編輯器寫(xiě)的一句話</div>
```
<div style='color:red;'>這是簡(jiǎn)書(shū)中編輯器寫(xiě)的一句話</div>
- javaScript代碼片段
```javascript
window.onload= function(){
alert(1);
}
```
window.onload= function(){
alert(1);
}
這是部分markdown的用法榄审。 已足夠日常注釋以及代碼的書(shū)寫(xiě)。后續(xù)會(huì)繼續(xù)更新杆麸。