<!DOCTYPE html>
<html lang="en">
<head>
    <title>Document</title>
    <style type="text/css">
        div.icon {
            width: 37px;
            height: 42px;
            border: 1px solid #000;
            background: url(images/timg.jpg) no-repeat;
        }
        div.iconPhone {
  · /*css精灵图通常位置设置为负值*/
            background-position: -57px -9px;
        }
        div.iconEmail {
   /*css精灵图通常位置设置为负值*/
            background-position: -58px -50px;
        }
    </style>
</head>
<body>
    <div class="icon iconPhone"></div>
    <div class="icon iconEmail"></div>
</body>
</html>
 
缺点:
开发过程繁琐
维护过程繁琐
当组合的图片过大且排列不当时,会消耗过多的内存