※ 漂亮動畫 ※
|
<script language="JavaScript"> <!--wenchin if (document.all){ kg=new Image(); kg.src="Aring.gif"; document.write('<span id="rings" style="position:absolute;top:0px;left:0px">' +'<img src="Aring.gif" name="kg" style="position:relative"></span>'); var TimeLinethree = 85; var TimeLineTwo = 0; var TimeLineOne = 0; var ThreeStep = 2.1; var TwoStep = 5.5; var OneStep = 2.5; var xp = 100; var yp = 100; function SmokeRing(){ document.all.rings.document.images["kg"].style.filter='alpha(opacity='+TimeLinethree+')'; document.all.rings.document.images["kg"].style.top=yp + (-TimeLineOne); document.all.rings.document.images["kg"].style.left=xp + (-TimeLineOne); document.all.rings.document.images["kg"].width=TimeLineTwo; document.all.rings.document.images["kg"].height=TimeLineTwo; TimeLinethree-=ThreeStep; TimeLineTwo+=TwoStep; TimeLineOne+=OneStep; setTimeout('SmokeRing()',10); if ((TimeLineTwo > 380) || (TimeLineOne > 380) || (TimeLinethree < 0)) {TimeLineTwo=0;TimeLineOne=0;TimeLinethree=85; stop=window.document.body.clientHeight-280; sleft=window.document.body.clientWidth/2.5;//? yp=Math.round(Math.random()*stop); xp=Math.round(Math.random()*sleft); document.all.rings.style.top=yp+document.body.scrollTop; document.all.rings.style.left=xp+document.body.scrollLeft; } if ((yp < 80) || (xp < 80)) { yp+=80; xp+=80; } } } if (document.all)SmokeRing(); // --> </script> |