本文介绍了如何在图像中心定义文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用html显示图像和相关图像的标题.
我希望标题位于图像的中心.
我该怎么做?

I am displaying image and heading of related image in html.
I want the heading to be at the center of the image.
How can I do this ?

推荐答案

#DisplayingImage { display:block; margin:0; padding:0; text-align:center; }
#DisplayingImage SPAN { vertical-align:middle; }


<div id="DisplayingImage" style="background: removed("image.jpg") no-repeat left top transparent;"><span>HEADING TEXT</span></div>


这篇关于如何在图像中心定义文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 15:21
查看更多