zoukankan      html  css  js  c++  java
  • 雪碧图 移动端雪碧图

    <!DOCTYPE html>  
    <html lang="en">  
    <head>  
        <meta charset="UTF-8">  
        <title>雪碧图</title>
        <style type="text/css">
            span{
                display: inline-block; 
                 24px; 
                height: 24px; 
                border: 1px solid #ccc;
                background-image: url(https://img-blog.csdn.net/20171130154115247?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveHV0b25nYmFv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center); background-repeat: no-repeat;
                margin: 5px;
            }
            .icon1{background-position: 0 0;}
            .icon2{background-position: -24px 0;}
            .icon3{background-position: 0 -24px;}
            .icon4{background-position: 0 -48px;}
        </style>
    </head>  
    <body>
        <div>雪碧图:</div>
        <div>
            <span class="icon1"></span>
            <span class="icon2"></span>
            <span class="icon3"></span>
            <span class="icon4"></span>
        </div>
        <div>原图:</div>
        <div><img src="https://img-blog.csdn.net/20171130154115247?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveHV0b25nYmFv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center"></div>
    </body>  
    </html>  





    <!DOCTYPE html>    
    <html lang="en">    
    <head>    
        <meta charset="UTF-8">    
        <title>移动端雪碧图</title>  
        <style type="text/css">  
            span{  
                display: inline-block;   
                 12px;   
                height: 12px;   
                border: 1px solid #ccc;  
                background-image: url(https://img-blog.csdn.net/20171130154115247?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveHV0b25nYmFv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center); 
                background-repeat: no-repeat;  
                background-size: 200% auto;
                margin: 5px;  
            }  
            .icon1{background-position: 0 0;}  
            .icon2{background-position: -12px 0;}  
            .icon3{background-position: 0 -12px;}  
            .icon4{background-position: 0 -24px;}  
        </style>  
    </head>    
    <body>  
        <div>雪碧图:</div>  
        <div>  
            <span class="icon1"></span>  
            <span class="icon2"></span>  
            <span class="icon3"></span>  
            <span class="icon4"></span>  
        </div>  
        <div>原图:</div>  
        <div><img src="https://img-blog.csdn.net/20171130154115247?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveHV0b25nYmFv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center"></div>  
    </body>    
    </html> 

    在线快速制作雪碧图:https://www.toptal.com/developers/css/sprite-generator



  • 相关阅读:
    Brighter3d无法渲染可导入REVIT渲染
    屏蔽优酷等视频网站片头广告
    REVIT机电管线支架族的创建
    如何显示链接的REVIT模型中的注释文字
    REVIT参数化自适应多边形拉伸
    REVIT族管理插件project family brower
    使用VMware虚拟磁盘管理工具调整磁盘大小
    硬件兼容性的陷阱,DrawIndexedPrimitiveUP的用法
    第二章 伤寒之意义(1)
    可变参数函数设计
  • 原文地址:https://www.cnblogs.com/xutongbao/p/9924929.html
Copyright © 2011-2022 走看看