Markdown常用样式

图片

建站教程

###Paragraph

Consecutive lines of text are considered to be one paragraph. As with other block level elements you have to add a blank line to separate it from the following block-level element:

The first paragraph.

Another paragraph

Explicit line breaks in a paragraph can be made by using two spaces or two backslashes at the end of a line:

This para line starts at the first column. However, the following lines can be indented any number of spaces/tabs. The para continues here.

This is another paragraph, not connected to the above one. But with a hard line break.
And another one.

引用

A blockquote is started using the > marker followed by an optional space; all following lines that are also started with the blockquote marker belong to the blockquote. You can use any block-level elements inside a blockquote:

A sample blockquote.

Nested blockquotes are also possible.

Headers work too

This is the outer quote again.

###列表

  • kram
  • down
  • now

  • First item A second paragraph
    • nested list

      blockquote

  • Second item
  1. First ordered list item
  2. Another item
    • Unordered sub-list.
  3. Actual numbers don’t matter, just that it’s a number
    1. Ordered sub-list
  4. And another item.

You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we’ll use three here to also align the raw Markdown).

To have a line break without a paragraph, you will need to use two trailing spaces.

Note that this line is separate, but within the same paragraph.

(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)
  • Unordered list can use asterisks
  • Or minuses
  • Or pluses

###代码块 要在 Markdown 中建立代码区块很简单,只要简单地缩进 4 个空格或是 1 个制表符就可以,例如,下面的输入: 这是一个普通段落:

这是一个代码区块。

代码片段

	[alias]
	ci = commit -a -v
	st = status -s
	br = branch
	throw = reset --hard HEAD
	thrown = reset --hard HEAD^

###代码 如果要标记一小段行内代码,你可以用反引号把它包起来(),例如: Use the printf()` function.

###强调 Markdown 使用星号()和底线(_)作为标记强调字词的符号,被 * 或 _ 包围的字词会被转成用 <em>标签包围,用两个 * 或 _ 包起来的话,则会被转成 <strong>,例如: *single asterisks

single underscores

double asterisks

double underscores

###分割线 你可以在一行中用三个以上的星号、减号、底线来建立一个分隔线,行内不能有其他东西。你也可以在星号或是减号中间插入空格。下面每种写法都可以建立分隔线:





Resource