1. Markdown 列表

Markdown 支持有序列表和无序列表。

1.1. 无序列表

无序列表使用星号(*)、加号(+)或是减号(-)作为列表标记,这些标记后面要添加一个空格,然后再填写内容:

Markdown 原文:

* 星号第一项
* 星号第二项
* 星号第三项

渲染后效果:

  • 星号第一项
  • 星号第二项
  • 星号第三项

Markdown 原文:

+ 加号第一项
+ 加号第二项
+ 加号第三项

渲染后效果:

  • 加号第一项
  • 加号第二项
  • 加号第三项

Markdown 原文:

- 减号第一项
- 减号第二项
- 减号第三项

渲染后效果:

  • 减号第一项
  • 减号第二项
  • 减号第三项

1.2. 有序列表

要创建有序列表,请在列表项中添加数字和句点(.)。数字不必按数字顺序排列,但列表应以数字开头。

Markdown 原文:

1. First item
2. Second item
3. Third item
4. Fourth item

渲染后效果

  1. First item
  2. Second item
  3. Third item
  4. Fourth item

Markdown 原文:

1. First item
1. Second item
1. Third item
1. Fourth item

渲染后效果:

  1. First item
  2. Second item
  3. Third item
  4. Fourth item

Markdown 原文:

1. First item
8. Second item
3. Third item
5. Fourth item

渲染后效果:

  1. First item
  2. Second item
  3. Third item
  4. Fourth item

Markdown 原文:

1. First item
2. Second item
3. Third item
    1. Indented item
    2. Indented item
4. Fourth item

渲染后效果:

  1. First item
  2. Second item
  3. Third item 1. Indented item 2. Indented item

  4. Fourth item

1.3. 列表嵌套

Markdown 原文:

1. 减号第一项
    - 减号第一项下的子项1
    - 减号第一项下的子项2
    - 减号第一项下的子项3
2. 减号第二项
3. 减号第三项

渲染后效果:

  1. 减号第一项

    • 减号第一项下的子项1
    • 减号第一项下的子项2
    • 减号第一项下的子项3
  2. 减号第二项

  3. 减号第三项

1.4. 列表连续性

要在保留列表连续性的同时在列表中添加另一个元素,请将该元素缩进四个空格或一个制表符,如以下示例所示。

示例中使用任意的有序编号以体现渲染后的有序列表的连续性。

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.

渲染后效果:

  1. Open the file.
  2. Find the following code block on line 21:

    A blockquote would look great below the second list item.

  3. Update the title to match the name of your website.

Copyright © 温玉 2021 | 浙ICP备2020032454号 all right reserved,powered by Gitbook该文件修订时间: 2022-02-12 10:51:48

results matching ""

    No results matching ""