通过background-image添加元素背景图片,
通过background-position把背景图片移动到需要的位置

t.png

2023-07-29T10:20:00.png

<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>



        .icon{
            display: block;
            width:45px;
            height:70px;
            background-image: url(t.png);
            border: 2px solid red;
            background-position: -10px -10px;
        }
        .icon1{
            display: block;
            width:45px;
            height:70px;
            background-image: url(t.png);
            border: 2px solid red;
            background-position: -101px -10px;
        }

    </style>
</head>
<body>
    
    <span class="icon"></span>
    
    <span class="icon1"></span>
</body>
</html>