1. 程式人生 > >12-27作業:HTML按鈕練習

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>

在這裡插入圖片描述