复主代码 代码如下: <머리> <제목>사용JavaScript는 PS里적 羽化效果代码 - www.jb51.net <br><!-- JavaScript의 시작 - <BR>var x,y <BR>var marginbottom <BR>var marginleft=0 <BR>var margintop=0 <BR>var marginright <BR>varcliptop <BR>varclipbottom <BR>varclipleft <BR>varclipright<BR>varclippoints <BR>var ballheight=150 <BR>var ballwidth=150 <BR>var imageheight=525 <BR>var imagewidth=457 <BR>var tempo=25 <BR>var stepx=12 <BR>var stepy=6 <BR>var 타이머 <BR>function setValues() { <BR>if (document.all) { <BR>marginbottom = 이미지 높이-볼 높이 <BR>marginright = 이미지 폭-볼 폭 <BR>document.all.ball.style.posLeft=randommaker(400) <BR>document.all.ball.style.posTop=0 <BR>document.all.textcontent.style.posLeft= 0 <BR>document.all.textcontent.style.posTop=0 <BR>document.all.ball.style.filter="alpha(opacity=0,finishopacity=100,style=2,startX=0px,startY=0px ,finishX=100px,finishY=100px)" <BR>moveball() <BR>} <BR>} <BR>// randomfunction <BR>function randommaker(range) { <BR>rand=Math.floor(range* Math.random()) <BR>rand 반환 <BR>} <BR>function moveball() { <BR>checkposition() <BR>if (document.all) { <BR>document.all.ball.style. posLeft =stepx <BR>document.all.ball.style.posTop =stepy <BR>cliptop=document.all.ball.style.posTop <BR>clipbottom=cliptop 볼 높이 <BR>clipleft=document.all.ball.style .posLeft <BR>clipright=clipleft 볼 폭 <BR>clippoints="lect("cliptop " "clipright " "clipbottom " "clipleft ")" <BR>document.all.textcontent.style.clip=clippoints <BR>timer= setTimeout("moveball()",tempo) <BR>} <BR>} <BR>function checkposition() { <BR>if (document.all) { <BR>if (document.all.ball.style.posLeft> ;=marginright) { <BR>stepx=stepx*-1 <BR>document.all.ball.style.posLeft-=10 <BR>} <BR>if (document.all.ball.style.posLeft<=marginleft ) { <BR>stepx=stepx*-1 <BR>document.all.ball.style.posLeft =10 <BR>} <BR>if (document.all.ball.style.posTop>=marginbottom) { <br>stepy=stepy*-1 <br>document.all.ball.style.posTop-=10 <br>} <br>if (document.all.ball.style.posTop<=margintop) { <BR>stepy= stepy*-1 <BR>document.all.ball.style.posTop =10 <BR>} <BR>} <BR>} <BR>// - JavaScript 끝 - --> <br> 스팬>