所用到的精灵图:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
div {
width: 280px;
height: 140px;
background: url(./sprites.png) no-repeat 0px -210px;
}
p {
width: 50px;
height: 50px;
background: url(./sprites.png) no-repeat -191px -63px;;
}
</style>
</head>
<body>
<div></div>
<p></p>
</body>
</html>