可以在markdown 表中创建一个列表(项目符号,编号与否).

一张桌子看起来像这样:

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

列表如下所示:

* one
* two
* three

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

推荐答案

是的,你可以用HTML合并它们.当我从Github在.md个文件中创建表时,我总是喜欢使用HTML代码而不是标记.

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

标记与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上的外观:

Html相关问答推荐

将弹性容器设置为内容宽度

对称渐变作为背景

让多对图像在各自的div中叠加

为什么前端框架可以创建自定义属性,而我却被期望在挖掘之前添加数据

无法从路径参数获取ID

如何保持嵌套进度条的背景色?

在Hero部分中同时zoom 背景图像和形状的问题

如何用背景色填充边框半径创建的间隙

如何防止弹性项目溢出容器?

当浏览器宽度减小时字体大小变得太大

如何实现与内嵌图像对齐的自动换行?

如何使用CSS Select 同级元素的::before伪元素?

将现有内容拆分为三列或部分

如何使文本区域自动扩展到最大高度?

如何删除输入中输入类型数字中的箭头?

如何为某些行具有 rowspan 的表的每个奇数行着色

鼠标悬停时切换 colored颜色 的双色链接

暗模式转换器

使用 CSS 样式化进度条

html tailwindcss 给 li 标签添加边框