如何在降价表中编写列表?

新手上路,请多包涵

可以在降价表中创建一个列表(项目符号,编号或不编号)。

一个表看起来像这样:

 | Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1600 |
| col 2 is      | centered      |   $12 |
| zebra stripes | are neat      |    $1 |

列表如下所示:

 * one
* two
* three

我能以某种方式合并它们吗?

原文由 Gabriel Petrovay 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 280
2 个回答

是的,您可以使用 HTML 合并它们。当我在 Github 的 .md 文件中创建表格时,我总是喜欢使用 HTML 代码而不是 markdown。

Github Flavored Markdown 支持 .md 文件中的基本 HTML。所以这就是答案:

Markdown 与 HTML 混合:

 | Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1600 |
| col 2 is      | centered      |   $12 |
| zebra stripes | are neat      |    $1 |
| <ul><li>item1</li><li>item2</li></ul>| See the list | from the first column|

或者纯 HTML:

 <table>
  <tbody>
    <tr>
      <th>Tables</th>
      <th align="center">Are</th>
      <th align="right">Cool</th>
    </tr>
    <tr>
      <td>col 3 is</td>
      <td align="center">right-aligned</td>
      <td align="right">$1600</td>
    </tr>
    <tr>
      <td>col 2 is</td>
      <td align="center">centered</td>
      <td align="right">$12</td>
    </tr>
    <tr>
      <td>zebra stripes</td>
      <td align="center">are neat</td>
      <td align="right">$1</td>
    </tr>
    <tr>
      <td>
        <ul>
          <li>item1</li>
          <li>item2</li>
        </ul>
      </td>
      <td align="center">See the list</td>
      <td align="right">from the first column</td>
    </tr>
  </tbody>
</table>

这是它在 Github 上的样子:

原文由 Ionică Bizău 发布,翻译遵循 CC BY-SA 3.0 许可协议

如果你想要一个无项目符号列表(或任何其他非标准用法)或单元格中的更多行使用 <br />

 | Event         | Platform      | Description |
| ------------- |-----------| -----:|
| `message_received`| `facebook-messenger`<br/>`skype`|

原文由 Amio.io 发布,翻译遵循 CC BY-SA 3.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题