//css 样式表
#aaa{
background-image:url(图片路径)
}
这样就是div 插入背景图片 ,div 中的 P 包含文字。
第一种方法:添加一个DIV,采用绝对定位,图片所属DIV为基准
<div style="position:relativewidth:100pxheight:100px">
<img src="" alt="" />
<div style="position:absolutewidth:100pxheight:100pxz-indent:2left:0top:0">
文字
</div>
</div>
第二种方法:图片作为背景图片
<div style="background:url(abc.jpg) no-repeat left top">
wenzi
</div>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)