Sun_ds's blog

Markdown学习笔记

记录一下Markdown的使用方法。

另:打一波广告~~~使用作业部落功能更加强大!


1. 嵌套HTML

可嵌套HTML来实现各种功能


FooFoo
FooFoo
FooFoo
<table>
    <tr>
        <th>Foo</th>
        <th>Foo</th>
    </tr>
    <tr>
        <td>Foo</td>
        <td>Foo</td>
    </tr>
    <tr>
        <td>Foo</td>
        <td>Foo</td>
    </tr>
</table>

2. 实现表格

Tables Are Cool
col 3 is right-aligned \$1600
col 2 is centered \$12
zebra stripes are neat \$1
项目 价格 数量
计算机 \$1600 5
手机 \$12 12
管线 \$1 234
// :-----:居中 :----左对齐  ----:右对齐
//注意$前记得加\
| Tables        | Are           |  Cool  |
| ------------- |:-------------:| :-----:|
| col 3 is      | right-aligned |  \$1600 |
| col 2 is      | centered      |    \$12 |
| zebra stripes | are neat      |     \$1 |


| 项目        | 价格   |  数量  |
| --------   | -----:  | :----:  |
| 计算机     | \$1600 |   5     |
| 手机        |   \$12   |   12   |
| 管线        |    \$1    |  234  |

3. 标题

H1
=====
H2
-----
#H1
##H2
###H3
####H4
#####H5
######H6

4. 引用

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.


5. 代码

  1. 缩进4个空格或1个制表符(TAB)

  2. `code` 仅支持单行

  3. ```

    something<br/>
    \`\`\`
    
This is a code;
int main()
{

}

这样就可以塞code

1
2
3
4
5
//This is a code;
int main()
{
string s;
}
    This is a code;
    int main()
    {

    }

这样就可以塞`code`啦

1
2
3
4
5
//This is a code;
int main()
{
string s;
}

6. 分割线

下面是一条分割线


下面是一条分割线


下面是一条分割线


下面是一条分割线



7. 列表

*-+加空格

  • list1
  • list2
  • list 3

任意数字加.加空格

  1. list1
  2. list2
  3. list3


#####无序列表
* list1
- list2
+ list 3
#####有序列表
1. list1
120. list2
3.  list3

8. 链接

This is an example inline link.

This link has no title attribute.

This is [an example](http://example.com/ "Title") inline link.

[This link](http://example.net/) has no title attribute.

9. 强调

single asterisks

single underscores

double asterisks

double underscores

删除线

*single asterisks*

_single underscores_

**double asterisks**

__double underscores__

~~删除线~~

#10. 插入图片

mark down

![mark down](https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1613194509,3683268681&fm=27&gp=0.jpg)

11. 自动链接

https://github.com/SunaShen


12. 特殊字符

符号前面加上反斜杠来帮助插入普通的符号

\ 反斜线

` 反引号

* 星号

_ 底线

{} 花括号

[] 方括号

() 括弧

# 井字号

+ 加号

- 减号

. 英文句点

! 惊叹号

\\   反斜线
\`   反引号
\*   星号
\_   底线
\{\}  花括号
\[\]  方括号
\(\)  括弧
\#   井字号
\+   加号
\-   减号
\.   英文句点
\!   惊叹号

13. 添加空格

你好    前面有三个空格呢。

你好 &nbsp;&nbsp;&nbsp;前面有三个空格呢。

参考

Markdown 语法说明(简体中文版)