如何在降价表中写列表? [英] How to write lists inside a markdown table?

查看:140
本文介绍了如何在降价表中写列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



一张表格如下所示:


$可以在降价表格内创建一个列表b $ b

  |表格|是|酷| 
| ------------- |:-------------:| -----:|
|第3栏是|右对齐| $ 1600 |
| col 2是|居中| $ 12 |
|斑马条纹|很整洁| $ 1 |

列表如下所示:

  *一个
*两个
*三个

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

解决方案

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



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



Markdown与HTML混合:

  |表格|是|酷| 
| ------------- |:-------------:| -----:|
|第3栏是|右对齐| $ 1600 |
| col 2是|居中| $ 12 |
|斑马条纹|很整洁| $ 1 |
| < UL><李> ITEM1和LT; /立GT;<李> ITEM2< /立GT;< / UL> |看清单|从第一列开始|

或纯HTML:

 <表> 
< tbody>
< tr>
< th>表< / th>
< th align =center>是< / th>
< th align =right>酷< / th>
< / tr>
< tr>
< td> col 3是< / td>
< td align =center>右对齐< / td>
< td align =right> $ 1600< / td>
< / tr>
< tr>
< td> col 2是< / td>
< td align =center>居中< / td>
< td align =right> $ 12< / td>
< / tr>
< tr>
< td>斑马条纹< / td>
< td align =center>是整洁的< / td>
< td align =right> $ 1< / td>
< / tr>
< tr>
< td>
< ul>
< li> item1< / li>
< li> item2< / li>
< / ul>
< / td>
< td align =center>查看列表< / td>
< td align =right>从第一列开始< / td>
< / tr>
< / tbody>
< / table>

这就是它在Github上的外观:



< blockquote>



Can one create a list (bullets, numbered or not) inside a markdown table.

A table looks like this:

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

A list looks like this:

* one
* two
* three

Can I merge them somehow?

解决方案

Yes, you can merge them using HTML. When I create tables in .md files from Github, I always like to use HTML code instead of markdown.

Github Flavored Markdown supports basic HTML in .md file. So this would be the answer:

Markdown mixed with 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|

Or pure 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>

This is how it looks on Github:

这篇关于如何在降价表中写列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆