素材图片:
源代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--这句一定要有-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>虾米熟了</title>
</head>
<style>
#xiami{
position:absolute;
width:21px;
height:21px;
left:100px;
top:50px;
background-image:url(pic1.jpg);
background-repeat:no-repeat;
background-position:-23px -9px;
}
#xiami:hover{
position:absolute;
width:21px;
height:21px;
left:100px;
top:50px;
background:url(pic1.jpg) no-repeat -23px -41px;
}
</style>
<body bgcolor="#999999">
<div id="xiami"></div>鼠标移上
</body>
</html>