jquery(鼠标)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="heiheihei/jquery-1.11.2.min.js"></script>
<title>无标题文档</title>
<style type="text/css">
.d{ width:400px; height:400px; margin:5px; background:url(image/3.jpg); float:left}
</style>
</head>
<body>
<div class="d"></div>
<div class="d"></div>
<div class="d"></div>
<div class="d"></div>
<div class="d"></div>
<div class="d"></div>
<div class="d"></div>
<div class="d"></div>
<div class="d"></div>
<div class="d"></div>
<div class="d"></div>
<div class="d"></div>
<div class="d"></div>
</body>
<script type="text/javascript">
$(".d").mouseover(function(){
//背景图
$(".d").css("background","url(image/3.jpg)");
//鼠标指向显示的图
$(this).css("background","url(image/2.jpg)");
})
$(".d").mouseout(function(){
//鼠标移除显示背景图
$(this).css("background","url(image/3.jpg)");
})
</script>
</html>