웨이브 효과 (문자열)
본문
다음을 복사해서 <body> 아래에 붙여넣으면 됩니다.
<b><div id="jump" style="text-align:center;font-size:15;color:orange;"></div></b>
<script>
// 아래의 문자열을 수정하면 된다.
message= "http://www.aircon1004.com/"
mes=new Array();
mes[0]=-1;
mes[1]=-4;
mes[2]=-7;
mes[3]=-10;
mes[4]=-7;
mes[5]=-4;
mes[6]=-1;
num=0;
num2=0;
txt="";
function jump0(){
if(message.length > 6){
for(i=0;i != message.length;i++){
txt=txt+"<span style='position:relative;'id='n"+i+"'>"+message.charAt(i)+"</span>"
}
jump.innerHTML=txt;txt="";
jump1a()
}
else{alert("Your message is to short")}
}
function jump1a(){
n0.style.left=-num2;
if(num2 != 9){num2=num2+3;setTimeout("jump1a()",50)}
else{jump1b()}
}
function jump1b(){
n0.style.left=-num2;
if(num2 != 0){num2=num2-3;setTimeout("jump1b()",50)}
else{jump2()}
}
function jump2(){
txt="";
for(i=0;i != message.length;i++){
if(i+num > -1 && i+num < 7){
txt=txt+"<span style='position:relative;top:"+mes[i+num]+"'>"+message.charAt(i)+"</span>"
}
else{txt=txt+"<span>"+message.charAt(i)+"</span>"}
}
jump.innerHTML=txt;
txt="";
if(num != (-message.length)){num--;setTimeout("jump2()",50)}
else{num=0;setTimeout("jump0()",50)}
}
jump0()
</script>
출처 : http://www.aircon1004.com/data/bbs/board.php?bo_table=pds1&wr_id=47
<b><div id="jump" style="text-align:center;font-size:15;color:orange;"></div></b>
<script>
// 아래의 문자열을 수정하면 된다.
message= "http://www.aircon1004.com/"
mes=new Array();
mes[0]=-1;
mes[1]=-4;
mes[2]=-7;
mes[3]=-10;
mes[4]=-7;
mes[5]=-4;
mes[6]=-1;
num=0;
num2=0;
txt="";
function jump0(){
if(message.length > 6){
for(i=0;i != message.length;i++){
txt=txt+"<span style='position:relative;'id='n"+i+"'>"+message.charAt(i)+"</span>"
}
jump.innerHTML=txt;txt="";
jump1a()
}
else{alert("Your message is to short")}
}
function jump1a(){
n0.style.left=-num2;
if(num2 != 9){num2=num2+3;setTimeout("jump1a()",50)}
else{jump1b()}
}
function jump1b(){
n0.style.left=-num2;
if(num2 != 0){num2=num2-3;setTimeout("jump1b()",50)}
else{jump2()}
}
function jump2(){
txt="";
for(i=0;i != message.length;i++){
if(i+num > -1 && i+num < 7){
txt=txt+"<span style='position:relative;top:"+mes[i+num]+"'>"+message.charAt(i)+"</span>"
}
else{txt=txt+"<span>"+message.charAt(i)+"</span>"}
}
jump.innerHTML=txt;
txt="";
if(num != (-message.length)){num--;setTimeout("jump2()",50)}
else{num=0;setTimeout("jump0()",50)}
}
jump0()
</script>
출처 : http://www.aircon1004.com/data/bbs/board.php?bo_table=pds1&wr_id=47
관련링크
댓글목록
등록된 댓글이 없습니다.