md语法代码

# 一级标题  
## 二级标题  
### 三级标题  
 
每写完一个段落要隔一行空行 换行
就像这样, 隔了一行空行.
 
\**重点加粗**
\*斜体*
\~~删除线~~
 
列表:
* 无序列表
  * 嵌套无序列表
  * 嵌套无序列表
* 无序列表
* 无序列表
---
 
1. 有序列表 1
   1. 嵌套有序列表 1
   2. 嵌套有序列表 2
2. 有序列表 2
3. 有序列表 3
---
 
任务列表:
- [x] 已经完成的事 1
- [x] 已经完成的事 2
- [x] 已经完成的事 3
- [ ] 仍未完成的事 4
- [ ] 仍未完成的事 5
---
 
引用文本:
> 引用别人说的话
> 就这样写
> By. OrangeX4
 
---
 
这是 `行内代码` 语法.
 
代码块语法:
``` python
print("Hello, World!")
```
 
代码行数的显示:
``` java{.line-numbers}
    function add(x, y) {
        return x + y
    }
```
 
---
 
[超链接名称](链接地址)
 
![图片提示语](图片地址)
 
例如, 可以使用网址和图床:
 
[OrangeX4's Blog](https://orangex4.cool/)
 
![OrangeX's Avatar](https://orangex4.cool/images/icons/profile.jpg)
 
也可以在本地用相对地址:
 
[Other](other.md)
 
![OrangeX's Avatar](images/profile.jpg)
 
---
 
表格:
| 表头 | 表头 |
| ---- | ---- |
| 内容 | 内容 |
| 内容 | 内容 |
 
拓展语法:
| 表头 | 表头 |
| ---- | ---- |
| 内容 | 内容 |
| >    | 内容 |
 
| 表头 | 表头 |
| ---- | ---- |
| 内容 | 内容 |
| ^    | 内容 |
 
---
 
注释:
<!-- 你看不见我 -->
 
<!-- 多行注释
就像这样 -->
 
---
mermaid图示例:
 
```mermaid
graph LR
    A --> B;
    B --> C;
    C --> A;
```
 
```mermaid
graph LR;
    APP-->EntityList;
    EntityList-->RuleList;
    EntityList-->EntityState;
    style APP fill:#99f
```
 
---
 
**这是加粗**
 
__这也是加粗__
 
*这是倾斜*
 
_这也是倾斜_
 
***这是加粗倾斜***
 
~~这是加删除线~~
 
> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
 
- 列表内容
+ 列表内容
* 列表内容
 
注意:- + * 跟内容之间都要有一个空格
 
1. 列表内容
2. 列表内容
3. 列表内容
 
注意:序号跟内容之间要有空格
 
你的标记写成:
1.  Bird
1.  McHale
1.  Parish
 
甚至:
 
8. Bird
1. McHale
4. Parish
 
效果都一样。
 
* 一级无序列表内容
   * 二级无序列表内容
   * 二级无序列表内容
   * 二级无序列表内容
 
*   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.
 
1.  This is a list item 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.
 
2.  Suspendisse id sem consectetuer libero luctus adipiscing.
 
表头|表头|表头
---|:--:|---:
内容|内容|内容
内容|内容|内容
 
第二行分割表头和内容。
- 有一个就行,为了对齐,多加了几个
文字默认居左
-两边加:表示文字居中
-右边加:表示文字居右
注:原生的语法两边都要用 | 包起来。此处省略
 
这是一个普通段落:
 
    这是一个代码区块。
 
(当然,前面要有一个空行和前面的文字分隔开)
 
```java
    public String handle01() {
        return "heelo,springboot";
    }
```
 
<font face="黑体">我是黑体字</font>
 
<font face="微软雅黑">我是微软雅黑</font>
 
<font face="STCAIYUN">我是华文彩云</font>
 
<font color=red>我是红色</font>
 
<font color=#008000>我是绿色</font>
 
<font color=#geen>我是绿色</font>
 
<font color=Blue>我是蓝色</font>
 
<font size=5>我是尺寸</font>
 
<font face="黑体" color=green size=5>我是黑体,绿色,尺寸为5</font>
 
<table><tr><td bgcolor=red>背景色yellow</td></tr></table>
 
<center>居中</center>
<p align="left">左对齐</p>
<p align="right">右对齐</p>
 
上标:X<sub>2</sub>,下标:O<sup>2</sup>
 
H<sub>2</sub>O  CO<sub>2</sub>
 
爆米<sup>TM</sup>
 
<http://example.com/>
 
| 项目        | 价格   |  数量  |
| --------   | -----:  | :----:  |
| 计算机      | $1600   |   5     |
| 手机        |   $12   |   12   |
| 管线        |    $1    |  234  |
 
| Left-Aligned  | Center Aligned  | Right Aligned |
| :------------ |:---------------:| -----:|
| col 3 is      | some wordy text | $1600 |
| col 2 is      | centered        |   $12 |
| zebra stripes | are neat        |    $1 |
 
| Item      | Value |
| --------- | -----:|
| Computer  | $1600 |
| Phone     |   $12 |
| Pipe      |    $1 |
 
#### 特殊符号 HTML Entities Codes
 
&copy; &  &uml; &trade; &iexcl; &pound;
&amp;&lt;&gt;&yen;&euro;&reg;&plusmn;&para;&sect;&brvbar;&macr;&laquo;&middot;
 
X&sup2; Y&sup3; &frac34; &frac14;  &times;  &divide;   &raquo;
 
18&ordm;C  &quot;  &apos;
 
#### 反斜杠 Escape
 
\*literal asterisks\*
 
---
 
```mermaid
graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;
    linkStyle 0 stroke:#0ff,stroke-width:2px;
    linkStyle 3 stroke:#ff3,stroke-width:4px;
```
 
---
 
```mermaid
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 <br/>prevail...
    John-->Alice: Great!
    John->Bob: How about you?
    Bob-->John: Jolly good!
```
 
---
 
```mermaid
sequenceDiagram
    Alice->>John: Hello John, how are you?
    John-->>Alice: Great!
```
 
---
 
```mermaid
sequenceDiagram
    participant John
    participant Alice
    Alice->>John: Hello John, how are you?
    John-->>Alice: Great!
```
 
---
 
```mermaid
sequenceDiagram
    A->B: 无箭头实线
    A-->B: 无箭头虚线(点线)
    A->>B: 有箭头实线
    A-->>B: 有箭头实线
    A-x B: 有箭头实线,加上叉
    A--x B: 有箭头虚线,加上叉
```
 
---
 
```mermaid
sequenceDiagram
    participant John
    Note right of John: Text in note
```
 
---
 
```mermaid
sequenceDiagram
    Alice-->John: Hello John, how are you?
    Note over Alice,John: A typical interaction
```
 
---
 
```mermaid
sequenceDiagram
    Alice->John: Hello John, how are you?
    %% loop 后跟循环体说明文字
    loop Every minute
        John-->Alice: Great!
    %% 标记循环结束
    end
```
 
---
 
```mermaid
sequenceDiagram
    Alice->>Bob: Hello Bob, how are you?
    alt is sick
        Bob->>Alice: Not so good :(
    else is well
        Bob->>Alice: Feeling fresh like a daisy
    end
    opt Extra response
        Bob->>Alice: Thanks for asking
    end
```
 
---




posted @ 2024-01-09 17:00  johanli  阅读(438)  评论(0)    收藏  举报