1、首先,打开html编辑器,新建html文件,例如:index.html。
2、在index.html中的<script>标签,输入js代码:
<div style="background: url(small2.png); height: 60px;">
<span style="position: absolute;right: 10px;">123</span>
</div>
3、浏览器运行index.html页面,此时文字成功浮动到了图片右上方了。
顶一下

(0)
0%
踩一下

(0)
0%
- 相关评论
- 我要评论
-