我想要的效果是一个圆 然后从高处掉下来 就这样一个效果 因为我的javascript是自学的 所以很多都不懂 谢谢各位

解决方案 »

  1.   


    <!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>
    <title> new document </title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="css.css" rel="styleSheet" type="text/css" />
    </head>
    <body>
    <div id="box" style="width:100px;height:100px;background-color:#0066FF;position:absolute;left:100px;"></div>
    <script type="text/javascript">
    var Tween = {
    Bounce: {
    easeOut: function(t,b,c,d){
    if ((t/=d) < (1/2.75)) {
    return c*(7.5625*t*t) + b;
    } else if (t < (2/2.75)) {
    return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
    } else if (t < (2.5/2.75)) {
    return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
    } else {
    return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
    }
    }
    }
    }
    var o = document.getElementById('box');
    var b = o.offsetTop, d = 200, t = 0; c = 300;
    function Run() {
    o.style.top = Math.ceil(Tween.Bounce.easeOut(t, b, c, d)) + 'px';
    if(t < d) { t++; setTimeout(Run, 10); }
    }
    Run();
    </script>
    </body>
    </html>