JS Frame:
function GetStyle (obj,attr) {if (Obj.currentstyle) {return obj.currentstyle[attr];} Else{return getComputedStyle (Obj,false) [attr];}} function Startmove (OBJ,JSON,FN) {var flag = true;//assumes clearinterval (obj.timer); obj.timer = SetInterval (function () {for ( var attr in JSON) {//Fetch current value var icur = 0;if (attr = = ' opacity ') {icur = Math.Round (parsefloat (GetStyle (obj,attr)) *100);} Else{icur = parseint (GetStyle (obj,attr))}//calculate speed var = (json[attr]-icur)/8;speed = Tempo >0? Math.ceil: Math.floor (speed);//Detect Stop if (icur! = json[attr]) {flag = false;} if (attr = = ' opacity ') {obj.style.filter = ' alpha ' (opacity: ' + (icur +speed) + ') '; obj.style.opacity = (icur + speed)/100;} ELSE{OBJ.STYLE[ATTR] = icur + speed + ' px ';}} if (flag) {clearinterval (Obj.timer), if (FN) {fn ();}}},30)}
Chain Animation (the previous action is complete, the latter action continues):
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
Simultaneous animation (simultaneous completion of multiple actions):<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
JS Animation 3 Perfect Frame