|
1、可移动的文字
<html><meta http-equiv=Content-Type content=text/html; charset=gb2312><body><STYLE>.drag {CURSOR: hand; POSITION: relative}</STYLE>
<SCRIPT language=JavaScript>var dragapproved=false;var z,x,y;function move(){if(event.button==1&&dragapproved){z.style.pixelLeft=temp1+event.clientX-x;z.style.pixelTop=temp2+event.clientY-y;return false;}};function drags(){if(!document.all) return;if(event.srcElement.className=="drag"){dragapproved=true;z=event.srcElement;temp1=z.style.pixelLeft;temp2=z.style.pixelTop;x=event.clientX;y=event.clientY;document.onmousemove=move}};document.onmousedown=drags;document.onmouseup=new Function("dragapproved=false");</SCRIPT>
<SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体"><FONT class=drag style="CURSOR: move" color=#cc0000>将鼠标按在这些字上,然后拖动你的鼠标,试试看会发生什么!</FONT></SPAN></body></html>
2、一个一个变色的文字
<html><meta http-equiv=Content-Type content=text/html; charset=gb2312><body><script>var message="一个个变色的文字,你想不想知道我是怎么弄的呢?";var neonbasecolor='red';var neontextcolor='black';var flashspeed=100;var n=0;
if (document.all){document.write('<font color='+neonbasecolor+'>');for (m=0;m<message.length;m++)document.write('<a href=http://www.netsh.com><span id=neonlight>'+message.charAt(m)+'</span></a>');document.write('</font>');var tempref=document.all.neonlight}else document.write(message);function neon(){if(n==0){for(m=0;m<message.length;m++)tempref[m].style.color=neonbasecolor};tempref[n].style.color=neontextcolor;if(n<tempref.length-1)n++;else{n=0;clearInterval(flashing);setTimeout("beginneon()",1500);return}};function beginneon(){if (document.all)flashing=setInterval("neon()",flashspeed)};beginneon()</script></body></html>
3、彩色打印机效果
<html><meta http-equiv=Content-Type content=text/html; charset=gb2312><body><DIV class=ttl1 id=ttl0><SPAN class=ttl1></SPAN></DIV>
<SCRIPT language="JavaScript">var layers=document.layers,style=document.all,both=layers || style,idme=908601;if (layers){layerRef='document.layers';styleRef='';};if(style){layerRef='document.all';styleRef='.style';};function writeOnText(obj, str){if(layers)with(document[obj]){document.open();document.write(str);document.close();};if (style)eval(obj+'.innerHTML=str');};var dispStr=new Array("<font color=red size=3>哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈</font><br><font color=green size=3>呵呵呵呵呵呵呵呵呵呵呵呵呵呵呵呵</font><br><font color=red size=3>嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻</font><br><font color=blue size=3>HOHOHOHOHOHOHOHOOHOHOHOHO</font><br><font color=red size=3>哈哈哈哈哈哈哈哈哈哈哈哈就是不告诉你我是怎么弄的</font>");var overMe=0;function txtTyper(str, idx, idObj, spObj, clr1, clr2, delay, plysnd){ var tmp0 = tmp1 = '', skip = 0;if (both && idx <= str.length) {if (str.charAt(idx) == '<') { while (str.charAt(idx) != '>') idx++; idx++; };if (str.charAt(idx) == '&' && str.charAt(idx+1) != ' ') { while (str.charAt(idx) != ';') idx++; idx++; };tmp0 = str.slice(0,idx);tmp1 = str.charAt(idx++);if (overMe==0 && plysnd==1){if(navigator.plugins[0]){if(navigator.plugins["LiveAudio"][0].type=="audio/basic" && navigator.javaEnabled()){document.embeds[0].stop();setTimeout("document.embeds[0].play(false)",100);}} else if(document.all){ding.Stop();setTimeout("ding.Run()",100);}; overMe=1;} else overMe=0;writeOnText(idObj, "<span class="+spObj+"><font color='"+clr1+"'>"+tmp0+"</font><font color='"+clr2+"'>"+tmp1+"</font></span>");setTimeout("txtTyper('"+str+"', "+idx+", '"+idObj+"', '"+spObj+"', '"+clr1+"', '"+clr2+"', "+delay+" ,"+plysnd+")",delay);}};function init(){txtTyper(dispStr[0], 0, 'ttl0', 'ttl1', '#339933', '#99FF33', 50, 0);}</SCRIPT><SCRIPT>init()</SCRIPT></body></html>
4、火焰字效果
<html><meta http-equiv=Content-Type content=text/html; charset=gb2312><body><style>#glowtext{filter:glow(color=red,strength=2);width:100%;}</style>
<script>function glowit(which){if(document.all.glowtext[which].filters[0].strength==2) document.all.glowtext[which].filters[0].strength=1;else document.all.glowtext[which].filters[0].strength=2};function glowit2(which){if (document.all.glowtext.filters[0].strength==2)document.all.glowtext.filters[0].strength=1; else document.all.glowtext.filters[0].strength=2};function startglowing(){if (document.all.glowtext&&glowtext.length){for (i=0;i<glowtext.length;i++);eval('setInterval("glowit('+i+')",150)')} else if (glowtext) setInterval("glowit2(0)",150)};if (document.all) window.onload=startglowing </script>
<div align=center><span id="glowtext" align=center style="font-size:30">大家看四楼有没有意思</span></div></body></html>
5、空心字效果
<div style="width:100%;filter:glow(color=#ff0000,strength=5);"><p style='font-size:38;color=#ffffff;' align=center>其实有趣的效果有很多很多,就看大家有没有兴趣去试了。只要你肯试,什么效果都可以做出来</p></div>
6、滚动字效果
<html><meta http-equiv=Content-Type content=text/html; charset=gb2312><body><SCRIPT LANGUAGE="JavaScript">var a,b,go,word;function greenlight(word){a="是不是开始滚动了";word.style.color="red";linkSwitch();};function linkSwitch(){clearTimeout(go);b=a;a=a.substring(1,100)+a.charAt(0);esh.innerText=a;go=setTimeout("linkSwitch()",100);};function stp(word){clearTimeout(go);esh.innerText="是不是又不肯滚动了";word.style.color="blue";}</SCRIPT>
<A HREF="http://www.txdx.net" onmouseover="greenlight(this)"; onmouseout="stp(this)"><span id="esh"> 把你的鼠标放在这里</span></A></body></html>
7、放大缩小字效果
<html><meta http-equiv=Content-Type content=text/html; charset=gb2312><body><DIV id=theDiv align=center></DIV>
<SCRIPT language=JavaScript>function nextSize(i,incMethod,textLength){if(incMethod==1)return(36*Math.abs(Math.sin(i/(textLength/3.14))));if(incMethod==2)return(255*Math.abs(Math.cos(i/(textLength/3.14))))};function sizeCycle(text,method,dis){output="";for(i=0;i<text.length;i++){size=parseInt(nextSize(i+dis,method,text.length));output +="<font style=font-size:"+size+"pt;color:#ff0000>"+text.substring(i,i+1)+"</font>";}theDiv.innerHTML=output;};function doWave(n){theText="回9楼,暂时我还不知道怎么让它循环";sizeCycle(theText,1,n);if(n>theText.length){n=0};setTimeout("doWave("+(n+1)+")",100);}</SCRIPT><SCRIPT>doWave(0)</SCRIPT></body></html>
8、光影字效果
<html><meta http-equiv=Content-Type content=text/html; charset=gb2312><body><div style="width:100%;filter:blur(add=true,direction=135,strength=10);"><p style='font-size:38;color=#ff0000;font-family:黑体' align=center>我发的都是文字,不是用PS做的,你选择一下文字就知道了</p></div></body></html>
9、隐藏链接效果
<div id=Out0 style="position:relative; left:20; top:+15px; width:90%;" ><span id=Out1 class=Outline style="hand: hand; "></span><p id=Out1 class=Outline style="cursor: hand; ">点击这里可以看到更多的东西<div id=Out1details style="display:None; position:relative; left:12;"><p style="line-height:150%"><a href="http://www.txdx.net">论坛首页</a><br><a href="http://www.txdx.net/forumdisplay.php?fid=38166">图行天下</a></div></div>
<script language=JavaScript>function clickHandler(){var targetId,srcElement,targetElement;srcElement=window.event.srcElement;if(srcElement.className=="Outline"){targetId=srcElement.id+"details";targetElement=document.all(targetId);if(targetElement.style.display=="none"){targetElement.style.display="";}else{targetElement.style.display="none";}}};document.onclick = clickHandler;</script>
10、最强的满屏乱飞图片效果
<html><meta http-equiv=Content-Type content=text/html; charset=gb2312><body><SCRIPT LANGUAGE="JavaScript">var a,b,go,word;function greenlight(word){a="难道你不想点这些字么";word.style.color="red";linkSwitch();};function linkSwitch(){clearTimeout(go);b=a;a=a.substring(1,100)+a.charAt(0);esh.innerText=a;go=setTimeout("linkSwitch()",100);};function stp(word){clearTimeout(go);esh.innerText="你还是点一下吧";word.style.color="blue";}</SCRIPT>
<A HREF="javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);" onmouseover="greenlight(this)"; onmouseout="stp(this)"><span id="esh"> 把你的鼠标点这些字一下下</span></A></body></html>
PS:其实你只要在地址栏输入javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);就可以了,呵呵
效果演示帖:http://www.txdx.net/viewthread.php?tid=378714&extra=page%3D1
http://www.txdx.net/viewthread.p ... page%3D1&page=1
[ 本帖最后由 传说中的坏蛋 于 2007-4-8 10:59 编辑 ] |
|