css按座标取情况图示例编码

2021-01-20 11:17 jianzhan
情况图:
 
实际效果:
 
编码:

拷贝编码
编码以下:

<style type="text/css">
.spanicon {
width: 32px;
height: 32px;
background: url(http://img.blog.csdn.net/205296) no-repeat;
border: 0;
color: #464646;
line-height: 32px;
margin-top: 2px
}
td {
vertical-align: middle;
text-align: left
}
</style>
<body>
<table>
<tr>
<td class="spanicon" style="background-position: 0px -0px;"></td>
<td><a href="#">test1</a></td>
</tr>
<tr>
<td class="spanicon" style="background-position: 0px ⑶2px;"></td>
<td><a href="#">test2</a></td>
</tr>
<tr>
<td class="spanicon" style="background-position: 0px ⑹4px;"></td>
<td><a href="#">test3</a></td>
</tr>
<tr>
<td class="spanicon" style="background-position: 0px ⑼6px;"></td>
<td><a href="#">test4</a></td>
</tr>
</table>
</body>