var example = new Fx(element,//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();
//アニメーションを再開します
完全なデモ コード:
Fx アニメーション クラスは CSS3 をサポートします/title>
./../ scripts/Fx.js" type="text/javascript">
著者別の最新記事
-
2025-02-24 12:36:12
-
2025-02-24 12:11:09
-
2025-02-24 12:06:10
-
2025-02-24 12:04:13
-
2025-02-24 12:03:10
-
2025-02-24 12:02:09
-
2025-02-24 12:01:10
-
2025-02-24 12:00:16
-
2025-02-24 11:59:10
-
2025-02-24 11:58:14