No 46 · 动态文字

<html>


<head>


<meta name="keywords" content="賨?Qu榶rHe,jsyrHe,js?g,?g,^JT鉔x,zzjs,zzjs.net,sky,www.zzjs.net,賨晊rHe Q" />


<meta name="description" content="www.zzjs.net,賨晊rHeQ賨暸_YjsyrHe蔛^JT鉔x0'Y蠎貧(嵪慾syrHe衏汷貧(嵪?^JT鉔xN}?=\(W賨晊rHeQ" />


<title>动态文字</title>


<SCRIPT language=JavaScript>


<!--


if (document.all){


//"k螐eg0R賨晊rHeQb霳剉Q@W/fwww.zzjs.net坃}Y皨zz賨?js1\/fjsyrHe,g賨6e茤'Y蠎貧(嵪慾s鉔x貜	g笅Y^JT鉔xN}?0


msg="姜启伟 一水间";  //緥nl彣R匭筟


msgColor="red";  //緥n噀W[湗r?
msgFont="Arial";  //緥n噀W[W[SO


msg=msg.split('');


n=msg.length;


e=360/n;


yp=110;


xp=110;


yb=40;  //緥n錘悥蠀鶺縹:N鶺芉剉俉魐PWh


xb=80; //緥n錘悥蠀鶺縹剉絒


sa=0.06;


sb=100;


pa=new Array();


pb=new Array();


for (i=0; i < n; i++){


document.write('<div id="txtaress" style="position:absolute;top:0;left:0;'


+'height:0;width:0;font-family:'+msgFont+';text-align:center;color:'+msgColor+'">'+msg[i]+'</div>');


}


function ani(){


yp=document.body.scrollTop+100;  //緥nW胈剉祣PWh


xp=document.body.scrollLeft+window.document.body.clientWidth-400;  //緥nW胈剉*jPWh


for (i=0; i < n; i++){


txtaress[i].style.top =yp+yb*Math.sin(sb+i*e*Math.PI/180);


txtaress[i].style.left=xp+xb*Math.cos(sb+i*e*Math.PI/180);


pb[i]=txtaress[i].style.pixelTop-yp;


pa[i]=pb[i]-pb[i]*2;


if (pa[i] < 1){


pa[i]=0;


txtaress[i].style.visibility='hidden';


}


else txtaress[i].style.visibility='visible';


txtaress[i].style.fontSize=pa[i]/2.7;


}


sb-=sa;


setTimeout('ani()',100);  //緥nl彣R剉惁^


}


window.onload=ani;


}//"k螐eg0R賨晊rHeQb霳剉Q@W/fwww.zzjs.net坃}Y皨zz賨?js1\/fjsyrHe,g賨6e茤'Y蠎貧(嵪慾s鉔x貜	g笅Y^JT鉔xN}?0


// -->


</SCRIPT>


</head>


<body>


<hr>


<!--"k螐eg0R賨晊rHeQb霳Q賨6e茤'Y蠎貧(嵪慾syrHe衏汷笅Y^JT鉔xN}?Q@Wwww.zzjs.net[email protected],(u.netSb 怱椯z-->


</body>


</html>

你可能感兴趣的:(JavaScript,function,XP,div,360)