作为程序员一定要保持良好的睡眠,才能好编程

随屏幕漂移图片

发布时间:2017-03-27


飘逸动画是封装在base库中的,只需要调用


song("#jj").piaoyi(); 这样就可以。



py.gif


<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <style type="text/css">
        *{margin:0px;padding:0px;}
        #jj{
            width:100px;
            height:100px;
            left:100px;
            top:100px;
            position: absolute;
            background: #f60;
        }



    </style>
    <script type="text/javascript" src="js/base.js"></script>
    <script type="text/javascript">

            window.onload=function(){
                
                song("#bs").click(function(){                  
                    song("#jj").piaoyi();
                    //song("#jj").piaoyi({x:2,y:3});
                });


            }

    </script>

</head>
<body>

    <input type="button" id="btn" value="按">
    <input type="button" id="bs" value="运动">


    <div id="parent">
        <div id="jj">
            <p id="person" style="background:#06f;">我是标题</p>
        </div>
    </div>

</body>
</html>

下载这个文件:并引入

base.rar