[英]Kramdown: How can I set the location of the image?
align=center
已弃用。 现在你最好使用CSS。
为了实现这一点,您需要将图像放在html块元素中 。 您的代码可以是:
<div class="img_container">
![Me]({{site.baseurl}}/img/me.jpg){: height="36px" width="36px"}
</div>
在你的CSS中,添加:
.img_container{
text-align: center;
}
并且,为了指示kramdown解析块html元素,在_config.yml中,添加:
kramdown:
parse_block_html: true
您的图像现在以其父块为中心。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.