zoukankan      html  css  js  c++  java
  • 抛物线效果

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
    div.panel{
    400px;
    height: 500px;
    border: 1px solid #000;
    float: left;
    }
    .btn{
    100px;
    height: 100px;
    background: red;
    }
    .tagesssst{
    100px;
    height: 100px;
    background: red;
    right: 10px;
    top:1000px;
    left: 800px;
    position:absolute;
    }
    </style>
    </head>
    <body>
    <div class="btn"></div>
    <div class="panel">
    <div class="item">
    <img class="photo" src="http://placekitten.com/150" width="100" height="100" />

    </div>
    <div class="item">
    <img class="photo" src="http://placekitten.com/150" width="100" height="100" />

    </div>
    <div class="item">
    <img class="photo" src="http://placekitten.com/150" width="100" height="100" />

    </div>
    </div>
    <div class="panel target">
    <div class="item">
    <img class="photo" src="http://placekitten.com/150" width="100" height="100" />

    </div>
    <div class="item">
    <img class="photo" src="http://placekitten.com/150" width="100" height="100" />

    </div>
    <div class="item">
    <img class="photo" src="http://placekitten.com/150" width="100" height="100" />

    </div>
    </div>
    <div class="panel">
    <div class="item">
    <img class="photo" src="http://placekitten.com/150" width="100" height="100" />

    </div>
    <div class="item">
    <img class="photo" src="http://placekitten.com/150" width="100" height="100" />

    </div>
    <div class="item">
    <img class="photo" src="http://placekitten.com/150" width="100" height="100" />

    </div>
    </div>
    <div class="tagesssst"></div>
    <script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>

    <script>
    $('.btn').on('click', function(){
    var i=0;
    move($('.item img'),i,$('.item img').length);
    });
    function move(all,index,ll) {
    console.log(all)
    var $orgImg = $(all[index]);
    console.log($orgImg)
    var $targetDiv = $('div.tagesssst');
    console.log($targetDiv[0])
    var $fxImg = $orgImg.clone().css({
    'position': 'absolute',
    'z-index': 10000,
    'width': $orgImg.width(),
    'height': $orgImg.height(),
    'border-radius': '50%'
    }).css($orgImg.offset()).appendTo('body');
    $fxImg
    .animate({
    left: [$targetDiv.offset().left + $targetDiv.width() - $fxImg.width(), 'linear'],
    top: [$targetDiv.offset().top + $targetDiv.height() - $fxImg.height(), 'easeInBack']
    }, 600)
    .fadeOut(200, function () {
    $fxImg.detach();
    index++;
    console.log(index,ll);
    if(index<ll){
    move(all,index,ll);
    }

    });
    }
    </script>
    </body>
    </html>
  • 相关阅读:
    【解决】Windows7任务栏输入法图标无法显示
    【解决】任务栏中找不到语言栏
    SQL Server中根据起始星期计算星期数和周次数的函数
    SharePoint 2010 中如何配置同步配置文件
    如何禁止Windows系统自动安装驱动
    [要点总结]SharePoint 2010:如何配置表单认证(FBA)
    【解决】如何升级网站集内容数据库
    [解决]Office 2010不能同步文件到SharePoint
    羽毛球比赛规则简略版
    [转]SharePoint 2013中如何恢复“用不同用户登录”链接
  • 原文地址:https://www.cnblogs.com/1rookie/p/10111373.html
Copyright © 2011-2022 走看看