jQuery简易图片放大特效示例代码
2014-06-09 00:00
651 查看
DEMO点击圆形图片,图片方法,将水的图片放置与下层,鼠标移上去的时候,图片高与宽同比增大,并且图片向左上移动
代码
代码
<!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" /> <title>无标题文档</title> <script src="js/jquery.min.js" type="text/javascript"></script> <script> $(document).ready(function(e) { $(".water1").mouseover(function(){ $("#img1").stop(true,true).animate({top:"-32.5px",left:"-32.5px", width:"400px",height:"400px"},"slow"); $("#img2").stop(true,true).animate({top:"-10px",left:"-10px", width:"115px",height:"115px"},"slow"); $("#img3").stop(true,true).animate({top:"-4px",left:"-4px", width:"41px",height:"41px"},"slow"); }) $(".water1").mouseout(function(){ $("#img1").stop(true,true).animate({top:"0px",left:"0px",width:"335px",height:"335px"},"slow"); $("#img2").stop(true,true).animate({top:"0px",left:"0px", width:"95px",height:"95px"},"slow"); $("#img3").stop(true,true).animate({top:"0px",left:"0px", width:"33px",height:"33px"},"slow"); }) }); </script> <style> .show{ width:1440px; height:474px; position:relative; background-color:#3d9abc;} .water1{ height: 335px; width:335px; border-radius:167.5px; overflow:hidden; position:absolute; left:186px; top:69px;} .water2{ height: 95px; width:95px; border-radius:47.5px; overflow:hidden; position:absolute; left:545px; top:294px;} .water3{ height: 33px; width:33px; border-radius:16.5px; overflow:hidden; position:absolute; left:549px; top:220px;} #img1{ position:absolute;} #img2{ position:absolute; } #img3{ position:absolute;} </style> </head> <body> <div class="show"> <div class="water1"><img id="img1" src="images/big.jpg" /></div> <div class="water2"><img id="img2" src="images/middle.jpg" /></div> <div class="water3"><img id="img3" src="images/small.jpg" /></div> </div> </body> </html>
相关文章推荐
- jQuery简易图片放大特效示例代码
- 可拖拽、拼接、放大图片的jQuery相册特效代码
- 可拖拽、拼接、放大图片的jQuery相册特效代码
- jQuery简易图片放大特效
- 简单的鼠标滑动上去图片放大Jquery特效代码
- JS实现的防Windows的图片放大特效代码
- jQuery滚动图片特效,jQuery无缝(不连续)滚动图片代码
- jquery特效 幻灯片效果示例代码
- jquery 图片放大效果(放大镜代码)
- 【HTML5示例代码分享】HTML5图片自动归类特效
- JQuery 图片放大代码
- jquery的图片展示--卡牌翻转效果的代码示例
- MM应用引擎示例代码:jQuery仿QQ窗口抖动特效
- 仿天猫商城鼠标移近图片变暗的jquery特效代码
- 【MM应用引擎示例代码】jQuery仿QQ窗口抖动特效
- jquery animate图片模向滑动示例代码
- jQuery滚动图片特效,jQuery无缝滚动图片代码
- jquery 视觉特效(当鼠标悬停时,放大小图片本身)
- jQuery版图片特效代码
- jQuery实现图片放大预览实现原理及代码