[JavaScript/JQuery] jQuery图片缩小效果

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
    http://www.kmnk01.com/hxpfk/2015/jq_1124/96.html
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title>jQuery图片缩小效果-jQuery学习</title>
  6. <link href="http://hyipaying.com/css/Stylesheet_min.css" rel="stylesheet" type="text/css" />
  7. <style type="text/css">
  8. h1{color:Green;}
  9. body{ background-color:#EEEEEE ; }
  10. .wrap{
  11. width:200px;
  12. height:200px;
    http://www.kmnk01.com/hxpfk/2015/jq_1124/97.html
  13. margin:0px;
  14. overflow:hidden;
  15. position:relative;
  16. float:left;
  17. }
  18. .wrap a img{
  19. border:none;
  20. position:absolute;
    http://www.kmnk01.com/hxpfk/2015/jc_1124/98.html
  21. top:-66.5px;
  22. left:-150px;
  23. height:500px;
  24. opacity: 0.5;
  25. }
  26. </style>
  27. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
  28. <script type="text/javascript">
  29. $(document).ready(function () {
  30. $('.wrap img').hover(
  31. function () {
    http://www.kmnk01.com/hxpfk/2015/jc_1124/98.html
  32. $(this).stop().animate({
  33. 'opacity': '1.0',
  34. 'height': '200px',
  35. 'top': '0px',
  36. 'left': '0px'
  37. });
  38. },
  39. function () {
  40. $(this).stop().animate({
    http://www.kmnk01.com/hxpfk/2015/jq_1124/100.html
  41. 'opacity': '0.5',
  42. 'height': '500px',
  43. 'top': '-50px',
  44. 'left': '-150px'
  45. });
  46. }
  47. );
  48. });
    http://www.kmnk01.com/hxpfk/2015/hzj_1124/99.html
  49. </script>
  50. </head>
  51. <body>
  52. <h1>jQuery图片缩小效果</h1>
  53. <div style="width:400px;margin:30px 0">
  54. <div class="wrap">
  55. <a href="#">
  56. <img src="data/attachment/forum/2015pic1/anyixuan01.jpg" alt=""/>
  57. </a>
  58. </div>
  59. <div class="wrap">
  60. <a href="#">
  61. <img src="data/attachment/forum/2015pic1/anyixuan03.jpg" alt=""/>
  62. </a>
  63. </div>
  64. <div class="wrap">
  65. <a href="#">
    http://www.kmnk01.com/hxpfk/2015/bt_1123/92.html
  66. <img src="data/attachment/forum/2015pic1/anyixuan05.jpg" alt=""/>
  67. </a>
  68. </div>
  69. <div class="wrap">
  70. <a href="#">
    http://www.kmnk01.com/hxpfk/2015/py_1124/103.html
  71. <img src="data/attachment/forum/2015pic1/anyixuan04.jpg" alt=""/>
  72. </a>
  73. </div>
  74. </div>
    http://www.kmnk01.com/hxpfk/2015/jq_1124/102.html
  75. </body>
  76. </html>
  77. .
复制代码
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值