css按坐标取背景图示例代码

只有相信自己的目标,努力工作和奋斗的人才能取得最终的成功。但是我一直相信的一件事是,当您触摸自己哭泣时,您就成功了!
背景图:

效果:

代码:
复制代码
代码如下:

<style type="text/css">
.spanicon {
width: 32px;
height: 32px;
background: url(http://img.blog.csdn.net/20130808153035296) 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 rel="nofollow noopener noreferrer" href="#">test1</a></td>
</tr>
<tr>
<td class="spanicon" style="background-position: 0px -32px;"></td>
<td><a rel="nofollow noopener noreferrer" href="#">test2</a></td>
</tr>
<tr>
<td class="spanicon" style="background-position: 0px -64px;"></td>
<td><a rel="nofollow noopener noreferrer" href="#">test3</a></td>
</tr>
<tr>
<td class="spanicon" style="background-position: 0px -96px;"></td>
<td><a rel="nofollow noopener noreferrer" href="#">test4</a></td>
</tr>
</table>
</body>

本文css按坐标取背景图示例代码到此结束。人的才能像挂钟一样,如果停止了摆动,就要落后了。小编再次感谢大家对我们的支持!

您可能有感兴趣的文章
css让页脚保持在底部位置的四种方案

Flex布局史上最简单使用语法教程

新的CSS 伪类函数 :is() 和 :where()示例详解

纯CSS打字动画的如何实现示例

CSS浮动引起的高度塌陷问题