如一个png中里面有三个不同颜色的小星星,怎么能准确写出每个小星星的像素位置?
如图
background-position
<div style="background: url(http://img.bbs.csdn.net/upload/201411/20/1416475573_323694.png) no-repeat 0px -30px;width:100px;height:34px"></div>
http://64.233.171.161/
搜索 css 图片 位置
得:
http://www.ruanyifeng.com/blog/2008/05/css_background_image_positioning.html
http://www.w3school.com.cn/cssref/pr_background-position.asp
http://www.wibibi.com/info.php?tid=79
有 合图工具,可以生成css。
<div style="background: url(http://img.bbs.csdn.net/upload/201411/20/1416475573_323694.png) no-repeat 0px -30px;width:100px;height:34px"></div>
<div style="background: url(http://img.bbs.csdn.net/upload/201411/20/1416475573_323694.png) no-repeat 0px -30px;width:100px;height:34px"></div>
HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号