文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>发布一个动画类 Fx.js

发布一个动画类 Fx.js

时间:2010-10-31  来源:tangoboy

 var example = new Fx(element,//元素

                {
                        form:{
                                //动画前的样式
                                //color:"#00f",
                        },
                        to:{
                                 //目标样式
                                color:"#00f",
                                "background-color":"#5f5",
                                opacity:0.9,
                        },
                        //线性方法
                        transition:Transition.elasticInOut,
                        //动画时间
                        duration:5000,
                        //动画帧值
                        fps:50,
                        onAnim:function(s){
                                //动画过程中
                        },
                        onStart:function(){
                                //动画开始时
                        },
                        onPause:function(){
                                //动画暂停时
                        },
                        onResume:function(){
                                //动画恢复时
                        },
                        onStop:function(){
                                //动画停止时
                        }
                }
);
//开始动画
example.start();

//停止动画
example.stop();

//停止动画并恢复到原始样式
example.stop(1);

//暂停动画
example.pause();

//恢复动画
example.resume();

 

 

Demo

下载 Fx.js

 

相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载