<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<style>
h3,ul{ margin: 0;padding: 0}
ul{list-style: none}
li h3{font-size: 14px;
font-weight: 400}
li{display: block;
height: 31px;
line-height: 31px;
overflow: hidden;
border-bottom: 1px solid #dedede;}
li i{background: url(good.png);
display: inline;
width: 30px;
height:24px;
float: left;
margin: 3px 10px 0 0}
.cat{width:150px;
background: #f8f8f8;
border: 1px solid #bbb;}
.cat-1 i{background-position: 0,0;}
.cat-2 i{background-position: 0,-24px;}
.cat-3 i{background-position: 0,-48px;}
.cat-4 i{background-position: 0,-72px;}
.cat-5 i{background-position: 0,-96px;}
.cat-6 i{background-position: 0,-120px;}
.cat-7 i{background-position: 0,-144px;}
.cat-8 i{background-position: 0,-168px;}
.cat-9 i{background-position: -40px,0;}
</style>
<body>
<div class="cat">
<ul>
<li class="cat-1">
<i></i>
<h3>服装内衣</h3>
</li>
<li class="cat-2">
<i></i>
<h3>服装内二</h3>
</li>
<li class="cat-3">
<i></i>
<h3>服装内的</h3>
</li>
<li class="cat-4">
<i></i>
<h3>服装内热</h3>
</li>
<li class="cat-5">
<i></i>
<h3>服装内放</h3>
</li>
<li class="cat-6">
<i></i>
<h3>服装内改</h3>
</li>
<li class="cat-7">
<i></i>
<h3>服装内好</h3>
</li>
<li class="cat-8">
<i></i>
<h3>服装内你</h3>
</li>
<li class="cat-9">
<i></i>
<h3>服装内她</h3>
</li>
</ul>
</div>
</body>
</html>
——————————————————————————————————————————————
为什么background-position:0,0;不是图的左上角而是中间切y轴怎么改图片都不动