举例:
<table style="left: 0px; top: 0px; position: relative; z-index: 1;" border="5" cellSpacing="5" borderColor="#990000" cellPadding="20" width="750" background="http://userimage3.360doc.com/13/0610/08/11945505_201306100802010013.jpg" bgColor="#00ff00" height="300">
<tbody> <tr> <td> <table style='background-image: url("http://image16.360doc.com/DownloadImg/2010/10/2915/6379737_54.gif");' border="0" cellSpacing="10" borderColor="#cccccc" cellPadding="0" width="100%" bgColor="#ffffff" align="center" height="450"> <tbody> <tr> <td> <table style='background-image: url("http://image60.360doc.com/DownloadImg/2013/04/3017/32001909_2.jpg");' border="0" cellSpacing="0" borderColor="#cccccc" cellPadding="0" width="750" bgColor="#ffffff" height="452"> <tbody> <tr> <td align="center"> <p style="left: 280px; top: 33px; width: 750px; position: absolute;"> <font style="line-height: 1.5em; letter-spacing: 1px; font-size: 35pt;" color="#ff0000" face="楷书">端午节快乐</font></p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table> ———————————————
注释:
修改下面的代码,可以把文字添加到图片的任意位置。文字在图片中的位置,用下面的标签控制:(定位代码)
<p style="left: 280px; top: 33px; width: 750px; position: absolute;"> 控制左右位置(居左值),修改left: 280px 。数字越大越偏右,数字越小越偏左。
控制上下位置(居上值),修改top: 33px 。数字越大越偏下,数字越小越偏上。
|
|