html 精灵图(HTML Sprite)

用background-image: url 把图片添加进去,

再用

background-repeat: no-repeat;删除重复

background-position: x坐标 y坐标;

再在hover里面写

background-position: x坐标 y坐标; 

将a标签表示为块级元素

display: block;

取消a下划线

text-decoration: none;

浮动 不用float 避免快塌陷

display: inline-block;

————————

Add the image with background image: URL,

Reuse

background-repeat: no-repeat;删除重复

background-position: x坐标 y坐标;

Then write in hover

background-position: x坐标 y坐标; 

Represents the a label as a block level element

display: block;

De underline a

text-decoration: none;

Float is not used to avoid fast collapse

display: inline-block;