Supports animation of most CSS 3 attributes (detailed attribute values may be specified ).
The Code is as follows:
Var example = new Fx (element, // element
{
Form :{
// The style before the animation
// Color: "# 00f ",
},
To :{
// Target Style
Color: "# 00f ",
"Background-color": "#5f5 ",
Opacity: 0.9,
},
// Linear method
Transition: Transition. elasticInOut,
// Animation time
Duration: 5000,
// Animation frame Value
Fps: 50,
OnAnim: function (s ){
// Animation Process
},
OnStart: function (){
// When the animation starts
},
OnPause: function (){
// When the animation is paused
},
OnResume: function (){
// When the animation is restored
},
OnStop: function (){
// When the animation is stopped
}
}
);
// Start the animation
Example. start ();
// Stop the animation
Example. stop ();
// Stop the animation and restore it to the original style
Example. stop (1 );
// Pause the animation
Example. pause ();
// Restore the animation
Example. resume ();
Complete DEMO code:
The Code is as follows:
Fx animation supports CSS3