简体   繁体   English

在 github markdown 中具有相同相对大小的图像的表格

[英]table with images of same relative size in github markdown

In GitHub's markdown, I have a table with one row and two columns, each containing an <img/> .在 GitHub 的 markdown 中,我有一个单行两列的表格,每列包含一个<img/> Without any width specification, the right of the two images is far larger than the left.没有任何width规范,两张图片的右边远远大于左边。

在此处输入图片说明

I would like to make sure the two images have the same width, but I don't want to specify the absolute size to avoid display issues on small screens.我想确保两个图像具有相同的宽度,但我不想指定绝对大小以避免在小屏幕上出现显示问题。 I'd love我很乐意

<img src="img1.png" width="45%"/> | <img src="img2.png" width="45%"/>                                                          
:----:|:----:|                                                                        

but apparently the 45% is now relative to the width of the column , not the page.但显然45%现在是相对于的宽度,而不是页面。

n

Any hints?任何提示?

Markdown extends HTML, so one can simply use HTML tables: Markdown 扩展了 HTML,因此可以简单地使用 HTML 表格:

<table width="100%">
  <tr>
  <td width="50%"></td>
  <td width="50%"></td>
  </tr>
</table>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM