markdown 操作

342 阅读1分钟

1.表格

1.1 不可合并单元格 md表格

| 表头     | 表头     | 表头     |
| -------- | -------- | -------- |
| 行1,列1 | 行1,列2 | 行1,列3 |
| 行2,列1 | 行2,列2 | 行2,列3 |
| 行3,列1 | 行3,列2 | 行3,列3 |
  • 效果
表头表头表头
行1,列1行1,列2行1,列3
行2,列1行2,列2行2,列3
行3,列1行3,列2行3,列3

1.2 合并单元格 html内嵌

  • 还未使用过
<h4>单元格跨行跨列:</h4>   <!--标题-->
<table border="1" width="500px" cellspacing="10">
<tr>
  <th align="left">表头(左对齐)</th>
  <th align="center">表头(居中)</th>
  <th align="right">表头(右对齐)</th>
</tr>
<tr>
  <td>行1,列1</td>
  <td>行1,列2</td>
  <td>行1,列3</td>
</tr>
<tr>
  <td colspan="2" align="center">合并行单元格</td>
  <td>行2,列3</td>
</tr>
<tr>
  <td rowspan="2" align="center">合并列单元格</td>
  <td>行3,列2</td>
  <td>行3,列3</td>
</tr>
<tr>
  <td>行4,列2</th>
  <td>行4,列3</td>
</tr>
</table>
<!--在表格td中,有两个属性控制居中显示
	align——表示左右居中——left,center,right
	valign——控制上下居中——left,center,right
	width——控制单元格宽度,单位像素
	cellspacing——单元格之间的间隔,单位像素
-->

1.3 样式

1.3.1 显示|符号

  • 背景
    • 在表格的内容中显示 | 符号
  • 解决
    • &#124;代替直接|

1.3.2 左对齐/右对齐

设置表格对齐方式:
| 左对齐 | 右对齐 | 居中对齐 |
| :-----| ----: | :----: |
| 单元格 | 单元格 | 单元格 |
| 单元格 | 单元格 | 单元格 |

  • 效果

设置表格对齐方式:

左对齐右对齐居中对齐
单元格单元格单元格
单元格单元格单元格

2.收缩界面

::: detail 显示代码

/```
代码内容,去掉上下/即可
/```

:::

3.