为什么Markdown无法正确对齐图像?

问题描述 投票:0回答:1

我正在使用下面的几行以Github markdown的形式获取对齐的图像,但是即使有空间,最后一张图像也总是会折断该行。

代码

# Example Img alightment #
<img align="left" src="https://github.com/hissain/CoronaTracker/blob/master/architecture/Screenshots/Android/Screenshot_Registration.png" alt="Android Registration" width="200"/>
<img align="center" src="https://github.com/hissain/CoronaTracker/blob/master/architecture/Screenshots/Android/Screenshot_Registration.png" alt="Android Registration" width="200"/>
<img align="right" src="https://github.com/hissain/CoronaTracker/blob/dev/architecture/Screenshots/Android/Screenshot_Registration.png" alt="Android Registration" width="200"/>

输出

enter image description here

我如何在一行中对齐所有三个图像?

参考:https://github.com/hissain/CoronaTracker/blob/dev/architecture/example.md

image github alignment markdown line-breaks
1个回答
0
投票
如果只需要将它们排成一行而不居中,则可以执行以下操作(只放置没有换行或带有<p>标签的图像):

<img src="https://github.com/hissain/CoronaTracker/blob/master/architecture/Screenshots/Android/Screenshot_Registration.png" alt="Android Registration" width="200"/> <img src="https://github.com/hissain/CoronaTracker/blob/master/architecture/Screenshots/Android/Screenshot_Registration.png" alt="Android Registration" width="200"/> <img src="https://github.com/hissain/CoronaTracker/blob/dev/architecture/Screenshots/Android/Screenshot_Registration.png" alt="Android Registration" width="200"/>

<p> <img src="https://github.com/hissain/CoronaTracker/blob/master/architecture/Screenshots/Android/Screenshot_Registration.png" alt="Android Registration" width="200"/> <img src="https://github.com/hissain/CoronaTracker/blob/master/architecture/Screenshots/Android/Screenshot_Registration.png" alt="Android Registration" width="200"/> <img src="https://github.com/hissain/CoronaTracker/blob/dev/architecture/Screenshots/Android/Screenshot_Registration.png" alt="Android Registration" width="200"/> </p>

© www.soinside.com 2019 - 2024. All rights reserved.