這是一篇懶懶的筆記 ( ̄▽ ̄)"
很多時候在網上尋找找問題的解決方法時
感覺一些文章的排版非常的清晰舒服
重點鮮明突出,看起來也不會很吃力
才知道那叫做 Markdown 語法
看了說明文檔,感覺這個語法也是很易用很酷的嘛
不過文檔里密密麻麻的字,又沒有直接顯示出呈現的效果,感覺看著有點麻煩
所以為了熟悉這個語法,把文檔中的效果都試了一遍,順便整理出來,方便查看
標題效果
- 底線形式
文字下添加 “ - ” 或 “ = ”
添加多少個 “ - ”、“ = ” 對效果沒有影響
-
格式:
這是標題 ------- 這是大標題 ========
-
效果:
這是標題
這是大標題
- 行首插入“#”
- 格式:
# 一個符號 ## 兩個符號 ### 三個符號 #### 四個符號 ##### 五個符號 ###### 六個符號
- 效果
一個符號
兩個符號
三個符號
四個符號
五個符號
六個符號
引用效果
在文字之前加上一個 “ > ”
- 格式:
> This is a blockquote 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 blockquote 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 the first level of quoting. > > > This is nested blockquote. > > Back to the first level.
-
嵌套引用效果:
This is the first level of quoting.
This is nested blockquote.
Back to the first level.
-
引用內嵌套其他語法:
> ## 這是一個標題。 > > 1. 這是第一行列表項。 > 2. 這是第二行列表項。 > > 給出一些例子代碼: > > return shell_exec("echo $input | $markdown_script");
-
引用內嵌套其他語法的效果:
這是一個標題。
- 這是第一行列表項。
- 這是第二行列表項。
給出一些例子代碼:
return shell_exec("echo $input | $markdown_script");
列表
- 無序列表
使用 “ * ”、“ + ” 或 “ - ” 做標記
符號和文字之前需要至少一個空格
效果都是相同的
- 格式
* Red * Green * Blue
+ Red + Green + Blue
- Red - Green - Blue
- 效果:
- Red
- Green
- Blue
- 有序列表
數字和一個英文句號開頭
需要空格
- 格式
1. Bird 2. McHale 3. Parish
- 效果:
- Bird
- McHale
- Parish
要在列表項目內放進引用的話>
需要縮進
- 列表項目內放進引用:
* A list item with a blockquote: > This is a blockquote > inside a list item.
- 效果:
- A list item with a blockquote:
This is a blockquote
inside a list item.
- A list item with a blockquote:
列表項目內放進代碼塊的話,代碼塊需要縮進兩次
- 列表項目內放代碼區塊:
* 一列表項包含一個列表區塊: <代碼寫在這>
- 效果:
-
一列表項包含一個列表區塊:
<代碼寫在這>
-
代碼區塊
縮進一個空格或一個制表符(tab)就可以建立代碼區塊
-
格式:
這是一個普通段落: 這是一個代碼區塊。
-
效果:
這是一個普通段落:這是一個代碼區塊。
或者用 ``` 包圍內容也可以建立代碼區塊
- 格式:
\``` 這是輸入的內容 ```\
這里因為再輸入的 ``` 會影響效果,所以加了 \
實際上前后的 \ 都是不要的
- 效果:
這是輸入的內容
- 在代碼區塊中,其他的Markdown語法不會生效
因此可以在代碼塊內編寫Markdown語法相關文件
分隔線
可以在一行中用三個以上的 “ * ”、“ - ” 或 “ _ ” 來建立分隔線
符號只要三個以上就可以
同行內不能有其他內容
- 下列輸入都可以形成分隔線
*** * * * --- ------------- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- 效果:
鏈接
1.行內式
方括號內寫鏈接名
方括號后緊跟圓括號內寫鏈接地址
可以在圓括號內、鏈接地址后寫鏈接的 title 文字,用雙引號包括即可
- 格式:
This is [an example](http://example.com/ "Title") inline link. [This link](http://example.net/) has no title attribute.
- 效果:
This is an example inline link.
This link has no title attribute.
2.參考式
方括號內寫鏈接名
方括號后在跟一個方括號,里面寫鏈接的標記
在文件的任意處定義標記的鏈接內容
定義標記的語句不會出現在問價當中
-
格式:
I get 10 times more traffic from [Google] [1] than from [Yahoo] [2] or [MSN] [3]. [1]: http://google.com/ "Google" [2]: http://search.yahoo.com/ "Yahoo Search" [3]: http://search.msn.com/ "MSN Search"
效果:
I get 10 times more traffic from Google than from
Yahoo or MSN.
也可以省略鏈接標記的文字,用鏈接文字代替鏈接標記來進行定義
- 格式:
I get 10 times more traffic from [Google][] than from
[Yahoo][] or [MSN][].
[google]: http://google.com/ "Google"
[yahoo]: http://search.yahoo.com/ "Yahoo Search"
[msn]: http://search.msn.com/ "MSN Search"
鏈接內容定義格式:
- 方括號,當中寫鏈接的標記
- 方括號后跟一個冒號和一個以上的空格或制表符
- 后跟鏈接地址,地址可以用尖括號 < > 包括,也可以不要
- 可選擇填寫鏈接的 title 內容,用單引號、雙引號或圓括號包括
- 鏈接標記可以有字母、數字、空白和標點符號,但是不區分大小寫 [a] 與 [A] 等同
強調
用 “ * ” 或 “_” 包圍文字來標記強調字詞
一個 “ * ” 或 “ _ ” 是斜體
兩個 “ * ” 或 “ _ ” 是粗體
“ * ” 和 “ _ ” 的兩邊不能同時有空格
“~~”形成刪除線
-
格式:
*single asterisks* _single underscores_ **double asterisks** __double underscores__ ~~刪除線 刪除線 刪除線~~
-
效果:
single asteriskssingle underscores
double asterisks
double underscores
刪除線 刪除線 刪除線
要插入普通的星號或底線,可以在前面加上反斜線:
- 格式:
\*this text is surrounded by literal asterisks\*
- 效果:
*this text is surrounded by literal asterisks*
行內代碼
用反引號 ` 包圍文字,標記行內代碼
- 格式:
Use the `printf()` function.
- 效果:
Use theprintf()
function.
圖片
一個驚嘆號 !
驚嘆號后跟一個方括號 方括號內填寫圖片的替代文字(會顯示在圖片下)
方括號后跟圓括號 圓括號內填圖片的網址
-
格式:
 
-
效果:
圖一圖二
簡單記了些 感覺還是比較常用的語法
一些細節問題沒記錄下來
且用著吧
目前用簡書的網頁編輯
本地的話下載了Macdown
都2018年了
好好學習哦小姑娘 ( ̄. ̄)