一张大图中包含很多小图,结合css的
"height", "width", "background-image","background-repeat","background-position"的组合进行背景定位。
<head> ???<meta charset="UTF-8"> ???<title>Document</title> ???<style> ???a { ???????width: 67px; ???????height: 32px; ???????background: url(110.png) no-repeat left top; ???????display: block; ?/*转换*/ ???} ???a:hover { ???????background-position: left bottom; ???} ???</style></head><body> ???<a href="#"></a></body>
CSS - 精灵Sprite
原文地址:https://www.cnblogs.com/allen2333/p/9004527.html