chaooo / hexo-theme-BlueLake

A simple theme for Hexo with great performance on different devices .
MIT License
328 stars 121 forks source link

图片显示 #82

Closed xiaoxiaotaoya closed 3 years ago

xiaoxiaotaoya commented 5 years ago

您好,

文章图片显示居中默认,请问如何自定义左对齐,谢谢!

<div align=left>
<img src="https://hexo-1257031621.cos.ap-chengdu.myqcloud.com/%E5%8D%9A%E5%AE%A2%E4%B8%93%E7%94%A8/%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/%E4%B8%BB%E9%A2%98%E6%8E%A8%E8%8D%90.jpg" width="400" hegiht="300">
</div>

尝试了这个,还是不行。

chaooo commented 5 years ago
<div style="text-align: left;">
       <img>
</div>
xiaoxiaotaoya commented 5 years ago

试了下,还是居中显示。

在markdown pad上是左对齐显示,但博客中还是居中显示。

<div style="text-align: left;">
<img src="https://hexo-1257031621.cos.ap-chengdu.myqcloud.com/%E5%8D%9A%E5%AE%A2%E4%B8%93%E7%94%A8/%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/%E4%B8%BB%E9%A2%98%E6%8E%A8%E8%8D%90.jpg" width="400" hegiht="300">
</div>
chaooo commented 5 years ago

图片默认块级化并居中显示,要实现左对齐,可还原成inline-block

<img style="display: inline-block;">