markdown语法

1.注释

[@_@]:注释内容,[]中的内容可以自定义,代码段中无效,只能外面用

2.标题

#一级标题

一级标题

##二级标题

二级标题

#####五级标题

五级标题

3.列表

-+*加内容表示无序列表,-+*与内容之间要加空格;二级无序列表加3个空格缩进

  • 一级无序列表
    • 二级无序列表
      • 三级无序列表

数字加.表示有序列表,如1.一级有序列表第一项,二级有序列表加3个空格缩进

  1. 一级有序列表第一项
    1. 二级有序列表第二项

4.字体

*斜体*
斜体
**加粗**
加粗
***斜体加粗***
斜体加粗,本文的注释格式
~~删除线~~
删除线

5.引用

>表示一级引用,>>表示二级引用,如下图>一级引用 >>二级引用

一级引用

二级引用。

返回一级引用

6.分割

3个以上"-"表示分割线:------


7.列表

内容|内容|内容
内容|内容|内容

第二行分割表头和内容。

  • 有一个就行,为了对齐,多加了几个
    文字默认居左
    -两边加:表示文字居中
    -右边加:表示文字居右
    注:原生的语法两边都要用 | 包起来。此处省略

示例如下:
姓名|技能|排行
--|:--:|--:
刘备|哭|大哥
关羽|打|二哥
张飞|骂|三弟

姓名 技能 排行
刘备 大哥
关羽 二哥
张飞 三弟

8.代码

``表示单行代码,如:`#include <stdlib.h>`
#include <stdlib.h>

``````表示代码块,如:
``` bash
#bash
echo "hello world!" #hello world
```
``` c++
// c++
#include <stdlib.h>
int main(){
printf("hello world!\n"); //hello world
return 0;
}
```

#bash
echo "hello world!"  #hello world
// c++
#include <stdlib.h>

int main(){
    printf("hello world!\n");   //hello world
    return 0;
}

9.链接

[xxx] (yyy), xxx表示标题,yyy表示链接,如:[markdown语法](https://coding.net/help/doc/project/markdown.html)

markdown语法

10.图片

![xxx](yyy) , xxx表示标题,yyy表示图片链接,如:![屏幕快照 2019-11-20 下午4.18.21.png](https://upload-images.jianshu.io/upload_images/20202959-cf4e3d30793d88ab.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

屏幕快照 2019-11-20 下午4.18.21.png

11.流程图

graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->E;
    E-->F;
    D-->F;
    F-->G;

流程图简书不支持,效果如下:

image.png

12.时序图

sequenceDiagram
    participant Alice
    participant Bob
    Alice->John: Hello John, how are you?
    loop Healthcheck
        John->John: Fight against hypochondria
    end
    Note right of John: Rational thoughts 
prevail...
    John-->Alice: Great!
    John->Bob: How about you?
    Bob-->John: Jolly good!

时序图简书不支持,效果如下:

image.png

13.甘特图

gantt
        dateFormat  YYYY-MM-DD
        title Adding GANTT diagram functionality to mermaid
        section A section
        Completed task            :done,    des1, 2014-01-06,2014-01-08
        Active task               :active,  des2, 2014-01-09, 3d
        Future task               :         des3, after des2, 5d
        Future task2               :         des4, after des3, 5d
        section Critical tasks
        Completed task in the critical line :crit, done, 2014-01-06,24h
        Implement parser and jison          :crit, done, after des1, 2d
        Create tests for parser             :crit, active, 3d
        Future task in critical line        :crit, 5d
        Create tests for renderer           :2d
        Add to mermaid                      :1d

时序图简书不支持,效果如下:

image.png

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。