[英]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.