css图片上加文字
第一种方法: 添加一个DIV,采用绝对定位,图片所属DIV为基准 <div style="position:relative;width:100px;height:100px;"> <img src="" alt="" /> <div style="position:absolute;width:100px;height:100px;z-indent:2;left:0;top:0;"> 文字 </div> </div> 第二种方法:图片作为背景图片 <div style="background:url(abc.jpg) no-repeat left top;"> wenzi </div>
比较推荐第一种
本文来自博客园,作者:沉迷编程的程序员,转载请注明原文链接:https://www.cnblogs.com/codeDevotee/p/7485864.html
欢迎各位找我代写程序,python、c#、web等都可以,加我请注明博客园微信:A15919195482