【问题标题】:scale image in table github markdown在表 github markdown 中缩放图像
【发布时间】:2019-09-25 00:51:21
【问题描述】:

我正在使用 Jeckyll 来呈现一个 GitHub 风格的降价表(至少我认为这是一个准确的描述)。我正在使用这个Jeckyll theme

如何在表格中缩放图像?我尝试了两件事:

| I say          | You say   | Example image  |
|-------------------|-------------------|-------------------|
| Hello | Goodbye| ![dummy](images/example-studies/Screenshot_gonogo.png){:width="50"}|
| Hello | Goodbye|  {% include image.html file="pathToImg/img.png" alt="img" max-width="200" %}|
| Hello | Goodbye|  {% include image.html file="pathToImg/img.png" alt="img" max-width="200" %}| 

第一行中的版本 (![dummy](pathToImage/image.png){:width="50"}) 不起作用。 (请参见下面屏幕截图中的第一行)。

第 2 行和第 3 行 ({% include image.html file="pathToImage/image.png" alt="alt text" max-width="200" %}) 上的版本确实有效,但我在呈现的表格中多了一行。

这个额外的行没有出现在 GitHub 预览中,所以我认为这是一个 Jeckyll 问题。

【问题讨论】:

    标签: github markdown jekyll


    【解决方案1】:

    你可以在 markdown 中使用 HTML 标签。尝试在您的表格中使用<img src="my/image/path"/>

    【讨论】:

      猜你喜欢
      • 2015-10-12
      • 1970-01-01
      • 2018-07-17
      • 1970-01-01
      • 2016-07-12
      • 1970-01-01
      • 2013-10-05
      • 2018-06-20
      • 1970-01-01
      相关资源
      最近更新 更多