【发布时间】:2017-08-28 02:17:04
【问题描述】:
有没有办法使用 ShowDown 使图像居中。
我正在尝试这样的事情:
## Next line has an image

【问题讨论】:
标签: showdown
有没有办法使用 ShowDown 使图像居中。
我正在尝试这样的事情:
## Next line has an image

【问题讨论】:
标签: showdown
要在 shodown 中设置特定图像的样式,you can use the title attribute。
问题是“居中”需要一个父元素来“居中”。所以你总是需要添加一个“包装器”。
要实现这一点,您有几个选择:
使用HTML and CSS(点击左上角的3条符号关闭选项菜单)
## Next line has an image
<div style="text-align: center;"><img src="http://i.imgur.com/wYTCtRu.jpg" width="50%"></div>
或
## Next line has an image
<div markdown="1" style="text-align: center;"></div>
使用the <center> html tag(在 HTML5 中已弃用)
## Next line has an image
<center></center>
wrap the image tag in a <a> tag and style with CSS
<style>
a[title="myImageWrapper"] {
display: block;
width: 100%;
text-align: center;
}
</style>
## Next line has an image
[](# "myImageWrapper")
【讨论】: