wcm19910616

 

图片上添加文字

 
 
 
 1.常用的方式是:将一张图片设置为背景,然后在里面加文字,你加入的图片代码是:
 
<img src="img.jpg" width=\'100px" height="50px">

改为:

<div style="background:url(\'img.jpg\') no-repeat;width:100px;height:50px">添加文字</div>

 

 

 

 2.一种是:加<span>标签,设置css样式,你加入的代码是:

<div style="position: relative; width: 170px; height: 89px;">
<img src="图片地址" width="170" height="89" alt="">
<span style="position: absolute; top: 0; left: 0;">添加文字...添加文字...添加文字...</span>
</div



二:seo 图片下显示文字




<
div style="position: relative; width: 170px; height: 89px;"> <img src="图片地址" width="170" height="89" alt="" style="position: absolute; top: 0; left: 0;"> <span >添加文字...添加文字...添加文字...</span> </div>

 

 

 

 

 

 

分类:

技术点:

相关文章: