本文介绍了如何在mpdf中居中放置图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将图像放在 mpdf (版本6>)中.
I would like to centre image in mpdf (version 6>).
这是我发送给mpdf的(缩短的)html输出. displayed 类没有帮助.
This is my (shortened) html output that I send to mpdf. The displayed class does not help.
<style> IMG.displayed { display: block; margin-left: auto; margin-right: auto } </style> <img style="max-height:600px" class="displayed" src="/images/size_original/m_princezna_1.jpg"/> 推荐答案在图像的父HTML元素上添加 text-align:center 属性,例如:
Add a text-align: center property on a parent HTML element of the image, eg.:
body { text-align: center }更多推荐
如何在mpdf中居中放置图像?
发布评论