其他分享
首页 > 其他分享> > 雪碧图的制作和使用

雪碧图的制作和使用

作者:互联网

 1 <!DOCTYPE html>
 2 <html>
 3     <head>
 4         <meta charset="utf-8">
 5         <title></title>
 6         <style type="text/css">
 7             .box1{
 8                 width: 129px;
 9                 height: 45px;
10                 background-image:url(img/amazon-sprite_.png) ;
11             }
12             .box2{
13                 width: 42px;
14                 height: 30px;
15                 background-image:url(img/amazon-sprite_.png) ;
16                 /*设置偏移量*/
17                 background-position: -58px -338px;
18             }
19         </style>
20     </head>
21     <body>
22         <div class="box1"></div>
23         <div class="box2"></div>
24     </body>
25 </html>

此节主要讲用PS如何制作雪碧图

  移动雪碧图从而使用背景图

标签:雪碧图,img,image,height,width,background,使用,制作
来源: https://www.cnblogs.com/kfj010810/p/14978884.html