(1)图片素材。图片按钮的一个练习
<!DOCTYPE html>
<html>
<head>
<metacharset="UTF-8">
<title></title>
<styletype="text/css">
a{
/*变成块元素*/
display:block;
width:170px;
height:170px;
background-image:url(img/botton/6.png);
background-repeat:no-repeat;
}
a:hover{
background-position:-180px 0px;
}
a:active{
background-position:-360px 0px;
}
</style>
</head>
<body>
<ahref="#"></a>
</body>
</html>
可以通过图片的定位,移动来显示我们所需要的背景,或者图片
background: center center fixed url(img/botton/6.png) no-repeat;
通过background可以