如何将文本置于HTML顶部的图像上

时间:2013-06-28 14:18:02

标签: html image center

在搜索了很多指南之后,我设法做到了这一点:http://img541.imageshack.us/img541/491/1i7.png但在其他网站上使用时,文字放错地方(你可以在http://www.indiedb.com/games/celosia看到)。这是我用过的代码:

<IMG SRC="http://img196.imageshack.us/img196/2261/vvpp.png">
<DIV STYLE="position:absolute; top:10px; left:30px; width:900px; height:25px">
<CENTER><FONT SIZE="+1" COLOR="white">Celosia - the gothic memory card game is a game for everyone, new to this genre or veterans, you will truly enjoy the dark atmosphere and awesome music. Help a goddess, travel around the world and unveil a big mystery or test your skills in the Time attack or Boss modes in over 50 levels. Celosia is currently in Alpha stage so everything you see is subject to changes. You can also follow the official Facebook or Twitter page for updates and news.</FONT></CENTER>
</DIV>

1 个答案:

答案 0 :(得分:0)

<DIV STYLE="position:absolute; top:10px; left:30px; width:900px; height:25px;background-url:http://img196.imageshack.us/img196/2261/vvpp.png;">
<CENTER><FONT SIZE="+1" COLOR="white">Celosia - the gothic memory card game is a game for        everyone, new to this genre or veterans, you will truly enjoy the dark atmosphere and awesome     music. Help a goddess, travel around the world and unveil a big mystery or test your skills in     the Time attack or Boss modes in over 50 levels. Celosia is currently in Alpha stage so     everything you see is subject to changes. You can also follow the official Facebook or Twitter     page for updates and news.</FONT></CENTER>
</DIV>

更新:

试试这个。 http://jsfiddle.net/astephenb/mBu4h/