<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
div {
width: 17px;
height: 13px;
background: url(images/jd.png) no-repeat;
background-position: 0 -388px; /* 因为背景图片往上移动,所以是负值 */
margin: 100px auto;
}
p {
width: 56px;
height: 49px;
background: url(images/jd.png) no-repeat;
background-position: 0 -438px; /* 因为背景图片往上移动,所以是负值 */
}
</style>
</head>
<body>
<!-- 1. 插入图片 margin padding float position 移动图片 大小就是width
2. 背景图片 background 来控制 size大小 background-position 位置 -->
<div>
</div>
<p></p>
</body>
</html>