12-27作业:HTML按钮练习

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>12-27作业</title>
	<style type="text/css">
		.box:link{
			display: block;
			height: 30px;
			width: 42px;
			margin: 50px auto;
			background-repeat: no-repeat;
			background-image: url(../images/amazon-sprite_.png);
			/*background-color: orange;*/
			background-position: -8px -338px;
		}
		.box:hover{background-position: -58px -338px;}
		.box:active{background-position: -128px -338px;}
	</style>
</head>
<body>
	<a href="http://www.4399.com" class="box" target="_block"></a>
</body>
</html>

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/rt5476238/article/details/85299678
今日推荐