最近写文章的时候发现,在markdown里插入一些很长的图片的时候,会显得很不好看,于是去查了一下如何实现markdown里图片的并排显示,参考了下面博客内的内容,方法如下:
1. 单张居中显示:
<center>
<img src="http://dreamofbook.qiniudn.com/Zero.png">
</center>
OR
<figure>
<img src="http://xxx.jpg">
</figure>
2. 固定图片宽度/高度:
<img src="http://xxx.jpg" title="Logo" width="100" />
宽度是 Width,高度是 High。Title 为图片描述。
3. 两张并排显示:
<figure class="half">
<img src="http://xxx.jpg">
<img src="http://yyy.jpg">
</figure>
4. 三张并排显示:
<figure class="third">
<img src="http://xxx.jpg">
<img src="http://yyy.jpg">
<img src="http://zzz.jpg">
</figure>
5. 固定宽度,并排显示并居中
就是把上面的几个例子合起来,下面给出代码
<center class="half">
<img src="http://xxx.jpg" width="300"/>
<img src="http://yyy.jpg" width="300"/>
</center>