减小字体 增大字体
] 源码如下----------------------------------------------------------<HTML><HEAD><TITLE>Cool-www.51windows.Net</TITLE><STYLE> DIV {width: 609; font-size: 40pt; font-family: Tahoma;font-weight: bold;}</STYLE><SCRIPT LANGUAGE="JavaScript">var count=0; var thePhase=0; var aniOn=0;var theStrength=0;var maxCount=40;var maxStrength=100;var theCount=0;var colorList=new Array("red", "blue", "green");varoDiv=null;var oQueue=new Array();function doStart(obj){oDiv=obj;oQueue.push("Welcome to 51js!");oQueue.push("Hello Friends!");oQueue.push("I love you");if(obj==null)return;if(!oQueue.length)return;oDiv.innerHTML=oQueue.shift();var ctrlRng=document.body.createControlRange()ctrlRng.add(oDiv)ctrlRng.select();ctrlRng.execCommand("SelectAll") theCount=0;doFilt();}function getStrength(pos){varret=0if(pos<maxCount){ret=maxStrength*pos*pos/(maxCount*maxCount);}else if(pos==maxCount){strNext=oQueue.shift()oDiv.innerHTML=strNext;rndNum=Math.floor(Math.random() * 3)oDiv.style.filter+="glow(color=" + colorList[rndNum] + ", strength=5)"ret=maxStrength;}else if(pos<2*maxCount){pos=2*maxCount-pos;ret=maxStrength*pos*pos/(maxCount*maxCount);}elseret=0;ret=Math.ceil(ret)return ret;}function anitext(){ thePhase=(thePhase + 10) oDiv.filters[0].phase=thePhase theStrength=getStrength(++theCount); window.status=theStrength if(theStrength==0)theCount=0; if(oQueue.length>0 || theStrength>0) { oDiv.filters[0].strength=theStrength; oTO=window.setTimeout("anitext()",0200,"JavaScript") }}function doFilt(){ oDiv.style.filter="wave(add=0, freq=3, lightstrength=50, phase=0, strength=2, enabled=1); " rndNum=Math.floor(Math.random() * 3) oDiv.style.filter+="glow(color=" + colorList[rndNum] + ", strength=5)" anitext()}function removeFilt(){ window.clearTimeout(oTO) oDiv.style.filter=" "}function arrPush(item){this[this.length]=item;}function arrShift(){var item=this[0];var nLen=this.length;for(var i=0;i<nLen-1;i++)this[i]=this[i+1];this.length--;return item;}Array.prototype.push=arrPush;Array.prototype.shift=arrShift;</SCRIPT></HEAD><BODY onload="doStart(MyDiv)"><DIV ID="MyDiv" align="center"></DIV></BODY></HTML>
[提示:你可先按照下面代码提示修改 上面部分代码,再按运行,此处看到的演示不完全正确]