Chinaunix首页 | 论坛 | 博客
  • 博客访问: 12220
  • 博文数量: 22
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 10
  • 用 户 组: 普通用户
  • 注册时间: 2014-02-08 17:41
文章分类

全部博文(22)

文章存档

2014年(22)

我的朋友
最近访客

分类: Java

2014-02-08 17:55:34

原文地址:图片展示 作者:baiyejianxin

图片展示

<!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的类库。

阅读(83) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~