使用提示
水韵效果
演示效果:正在演示中
代码提示:按下面的说明修改并复制代码
第一步:把如下代码加入<body>区域中 <script language="JavaScript"> <!-- //修改下面二处的图像地址 I=new Image(); I.src="photo/0109ring.gif"; if (document.all){ document.write('<div id="C" style="position:absolute;top:0px;left:0px">'); document.write('<div style="position:relative">'); document.write('<img id="pic" src="0109ring.gif" style="position:absolute;top:0px;left:0px">'); document.write('</div></div>'); } S=null,fadeStep=4,fade=80,currentStep=0,step=2,RY=0,RX=0,Yarea=0,Xarea=0; function Expand(){ if (document.all){ pic.width=currentStep*2; pic.height=currentStep*2; pic.style.top= -currentStep; pic.style.left= -currentStep; pic.style.filter='alpha(opacity='+fade+')'; currentStep+=step; if (currentStep > 20) fade-=fadeStep; if (fade < -50) { currentStep=0; fade=80; Yarea=window.document.body.clientHeight-80; Xarea=window.document.body.clientWidth-80; RY=Math.round(50+Math.random()*Yarea); RX=Math.round(50+Math.random()*Xarea); C.style.top=RY+document.body.scrollTop; C.style.left=RX+document.body.scrollLeft; } S=setTimeout('Expand()',40); } } if (document.all)window.onload=Expand; if (document.layers) { alert("Your Browser is not capable of displaying this effect.\nPick another."); opener.gO();window.close(); } // --> </script> <div style="position:relative"></div> 第二步:修改<body***>中的内容,将下面的代码加入原<body***>中 onload="if (document.all)SmokeRing()"
使用提示
返回目录