图片展示
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""> <html xmlns=""> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>图像预览</title> <script src="../jQuery js/jquery-1.3.2.js" ></script> <script> $(function(){ $("img").mouseover(function(e){ $("#show").hide(); $("#show").attr("src",this.src); $("#show").fadeIn(); }).mouseout(function(e){ }); });
</script>
<style> body{ margin:0px; height:100%; width:100%} .images{ width:128px; height:40px; margin:auto;} img{ width:32px; height:32px;} .goalImages{ width:128px; height:150px; margin:auto;} .goalImages img{ width:128px; height:128px;} </style> </head>
<body> <div class='goalImages'><img id="show" src="../images/25.png"/></div> <div class="images"> <img src="../images/25.png" /><img src="../images/32.png" /><img src="../images/34.png" /><img src="../images/35.png" /> </div> </body> </html>
|
注意要加入jQuery的类库。