美文网首页qwlz
CSS背景精灵技术(sprite) 雪碧技术

CSS背景精灵技术(sprite) 雪碧技术

作者: 9979eb0cd854 | 来源:发表于2018-07-21 17:15 被阅读103次
image.png
image.png

拼出自己的名字——ANDY

image.png
image.png
image.png

NDY以此类推

总结:

利用CSS的“background-image”,“background-repeat”,“background-position”的组合进行背景定位

用到的代码:

background: url(images/abcd.jpg) no-repeat;
width: 108px;
height: 108px;
background-position: 0  -9px;

相关文章

网友评论

    本文标题:CSS背景精灵技术(sprite) 雪碧技术

    本文链接:https://www.haomeiwen.com/subject/pfwhmftx.html