当前位置: 移动技术网 > IT编程>网页制作>CSS > 前端精灵效果实现代码

前端精灵效果实现代码

2018年04月03日  | 移动技术网IT编程  | 我要评论

前端精灵效果实现代码

<!DOCTYPE html>  
<html lang="en">  
<head>  
    <meta charset="UTF-8">  
    <title>css精灵</title>  
    <style>  
        p{  
            width: 80px;  
            height: 80px;  
            background: url("pp.png");  
            background-repeat: no-repeat;  
        }  
        #box1{  
            /*191 480*/  
            background-position: -480px -191px;  
        }  
        #box2{  
              
        }  
        #box3{  
          
        }  
        #box4{  
              
        }  
    </style>  
</head>  
<body>  
    <p id="box1"></p>  
    <p id="box2"></p>  
    <p id="box3"></p>  
    <p id="box4"></p>  
  
  
</body>  
</html>  

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网