MarkDown -- 基本语法

markdown语法要素

1. 标题

# 这是 <h1> 一级标题
## 这是 <h2> 二级标题
### 这是 <h3> 三级标题
#### 这是 <h4> 四级标题
##### 这是 <h5> 五级标题
###### 这是 <h6> 六级标题
#这个标题拥有 1 个 id {#my_id}
# 这个标题有 2 个 classes {.class1 .class2}

2.强调

*这会是 斜体 的文字*
_这会是 斜体 的文字_

**这会是 粗体 的文字**
__这会是 粗体 的文字__

_你也 **组合** 这些符号_

~~这个文字将会被横线删除~~

3. 列表

  1. 无序
* Item 1
* Item 2
 * Item 2a
 * Item 2b
  1. 有序
1. Item 1
2. Item 2
 3. Item 2a
 3. Item 2b

4. 添加图片

![GitHub Logo](/images/logo.png)
Format: ![Alt Text](url)

5. 链接

http://github.com - 自动生成!
[GitHub](http://github.com)

6. 引用

> We're living the future so
> the present is our past.

7. 分割线

如下,三个或者更多的
---
***

8. 行内代码

`包裹的代码`

8. 代码块

你可以在你的代码上面和下面添加 ``` 来表示代码块。
或者直接tab一下

9. 语法高亮

你可以给你的代码块添加任何一种语言的语法高亮

例如,给 ruby 代码添加语法高亮:

```ruby
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
```

会得到下面的效果:

require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html

10. 代码行数

只要添加 line-numbers class 就可以了。

```javascript {.line-numbers}
function add(x, y) {
return x + y
}
```

11. 任务列表

- [x] @mentions, #refs, [links](), **formatting**, and <del>tags</del> supported
- [x] list syntax required (any unordered or ordered list supported)
- [x] this is a complete item
- [ ] this is an incomplete item

12. 表格

其实就是中间加个竖杠

First Header Second Header
Content from cell 1 Content from cell 2
Content in the first column Content in the second column

13. 标记

==marked==

marked

14. 脚注

Content [^1]
[^1]: Hi! This is a footnote

Content [1]

15. 下标

H~2~O

导入文件

@import "你的文件"

就可以了,很简单对吧~ d(・∀・)b


  1. Hi! This is a footnote ↩︎

posted @ 2017-06-30 14:28  Dear-LL  阅读(173)  评论(0编辑  收藏  举报