Markdown 列表
Markdown 支持有序列表和无序列表。
无序列表
无序列表使用星号(*)、加号(+)或是减号(-)作为列表标记,这些标记后面要添加一个空格,然后再填写内容:
Markdown 原文:
* 星号第一项* 星号第二项* 星号第三项
渲染后效果:
- 星号第一项
- 星号第二项
- 星号第三项
Markdown 原文:
+ 加号第一项+ 加号第二项+ 加号第三项
渲染后效果:
- 加号第一项
- 加号第二项
- 加号第三项
Markdown 原文:
- 减号第一项- 减号第二项- 减号第三项
渲染后效果:
- 减号第一项
- 减号第二项
- 减号第三项
有序列表
要创建有序列表,请在列表项中添加数字和句点(.)。数字不必按数字顺序排列,但列表应以数字开头。
Markdown 原文:
1. First item2. Second item3. Third item4. Fourth item
渲染后效果
- First item
- Second item
- Third item
- Fourth item
Markdown 原文:
1. First item1. Second item1. Third item1. Fourth item
渲染后效果:
- First item
- Second item
- Third item
- Fourth item
Markdown 原文:
1. First item8. Second item3. Third item5. Fourth item
渲染后效果:
- First item
- Second item
- Third item
- Fourth item
Markdown 原文:
1. First item2. Second item3. Third item1. Indented item2. Indented item4. Fourth item
渲染后效果:
- First item
- Second item
Third item 1. Indented item 2. Indented item
Fourth item
列表嵌套
Markdown 原文:
1. 减号第一项- 减号第一项下的子项1- 减号第一项下的子项2- 减号第一项下的子项32. 减号第二项3. 减号第三项
渲染后效果:
减号第一项
- 减号第一项下的子项1
- 减号第一项下的子项2
- 减号第一项下的子项3
减号第二项
减号第三项
列表连续性
要在保留列表连续性的同时在列表中添加另一个元素,请将该元素缩进四个空格或一个制表符,如以下示例所示。
示例中使用任意的有序编号以体现渲染后的有序列表的连续性。
Markdown 原文:
1. Open the file.1. Find the following code block on line 21:> A blockquote would look great below the second list item.1. Update the title to match the name of your website.
渲染后效果:
- Open the file.
Find the following code block on line 21:
A blockquote would look great below the second list item.
Update the title to match the name of your website.
