长沙学院论坛

 找回密码
 注册(开放注册)
搜索
查看: 1527|回复: 14
打印 上一主题 下一主题

[软件] 论坛一些常用特效文字技巧

[复制链接]
跳转到指定楼层
1#
发表于 2007-2-17 20:37:12 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
一些常用HTML代码
将代码中的文字修改为自己所需要的字
学过C程的可以自己修改代码
学过HTML的可以自己写代码
都不会的就照着用
要将代码段复制到[Discuz!代码模式]下 并将页面左下方的[启用Html代码]勾选 切记!

火烧文字:
(换字就可以用了,在代码的开头有一处color=red可以换成其他颜色,颜色也可以用其他形式表达,如:#FF0000)

<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>


文字逐个闪烁:
(如果要改字的个数,请将代码中的几处4改为你要的字的个数,代码中的前一个颜色是闪烁的颜色,后一个是不闪烁的颜色)

<script>var temp_i=1;function flash_sms(){for (i=1;i<=4;i++){if (i==temp_i) temp_str="#ff3300"; else temp_str="#336699";eval("a"+i+".style.color="+"temp_str"+";");}temp_i++;if (temp_i>4) temp_i=1;};setInterval("flash_sms()",200);</script>
<SPAN id=a1>和</SPAN><SPAN id=a2>山</SPAN><SPAN id=a3>论</SPAN><SPAN id=a4>坛</SPAN>

彩色渐变:
(改“ 我爱和山论坛 ”的时候不要删掉文字前的三个空格和后面的四个空格)


<script>function MakeArray(n){this.length=n;for(var i=1; i<=n; i++) this=i-1;return this};hex=new MakeArray(16);hex[11]="A";hex[12]="B";hex[13]="C";hex[14]="D";hex[15]="E";hex[16]="F";function ToHex(x){var high=x/16;var s=high+"";s=s.substring(0,2);high=parseInt(s,10);var left=hex[high+1];var low=x-high*16;s=low+"";s=s.substring(0,2);low=parseInt(s,10);var right=hex[low+1];var string=left+""+right;return string;};function rainbow(text){text=text.substring(3,text.length-4);color_d1=255;mul=color_d1/text.length;for(i=0;i<text.length;i++){color_d1=255*Math.sin(i/(text.length/3));"255*Math.sin(i/(text.length/3))";color_h1=ToHex(color_d1);color_d2=mul*i;color_h2=ToHex(color_d2);document.write("<FONT COLOR=#FF"+color_h1+color_h2+">"+text.substring(i,i+1)+"</FONT>");}}</script>
<script>{rainbow("   我爱和山论坛    ");}</script>


一个个变色文字:
(red和black处是定义颜色的,http://www.h3bbs.com处定义的是链接,100是速度,越小越快)

<script>var message="欢迎来到和山论坛";var ne;var ne;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.h3bbs.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>


WAVE文字:
(36控制字体大小,数字越大,字体越大,100控制速度,数字越小速度越快,#ff0000控制颜色)

<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="我爱和山论坛";sizeCycle(theText,1,n);if(n>theText.length){n=0};setTimeout("doWave("+(n+1)+")",100);}</SCRIPT><SCRIPT>doWave(0)</SCRIPT>
2#
发表于 2007-2-17 22:21:35 | 只看该作者
<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>
3#
发表于 2007-2-17 22:22:56 | 只看该作者
<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>
4#
发表于 2007-2-17 22:23:58 | 只看该作者
5#
发表于 2007-2-18 01:07:23 | 只看该作者
比看到英语还头疼
6#
发表于 2007-2-18 12:35:54 | 只看该作者

回复 #1 小熊寶寶 的帖子

lz请给个演示!!

7#
发表于 2007-2-18 19:57:46 | 只看该作者
论坛还有很多不足

你慢慢找吧!
8#
 楼主| 发表于 2007-2-18 20:14:17 | 只看该作者
呃..偶米发现么..
9#
发表于 2007-2-18 20:20:12 | 只看该作者

回复 #9 小熊寶寶 的帖子

你自己不做论坛那,所以不知道

要不到我的论坛去看看

我的旧基本上都修复了!
10#
 楼主| 发表于 2007-2-18 20:22:23 | 只看该作者
不要去,哼!!
11#
发表于 2007-2-18 20:47:39 | 只看该作者
<script>var temp_i=1;function flash_sms(){for (i=1;i<=4;i++){if (i==temp_i) temp_str="#ff3300"; else temp_str="#336699";eval("a"+i+".style.color="+"temp_str"+";");}temp_i++;if (temp_i>4) temp_i=1;};setInterval("flash_sms()",200);</script>
<SPAN id=a1>理</SPAN><SPAN id=a2>工</SPAN><SPAN id=a3>论</SPAN><SPAN id=a4>坛</SPAN>
12#
 楼主| 发表于 2007-2-18 20:48:15 | 只看该作者
偶人气冲顶了

不用刷..

偶只是爱心值不够
13#
发表于 2007-2-18 20:50:58 | 只看该作者
原帖由 kibaa 于 2007-2-18 08:47 PM 发表
<script>var temp_i=1;function flash_sms(){for (i=1;i<=4;i++){if (i==temp_i) temp_str="#ff3300"; else temp_str="#336699";eval("a"+i+".style.color=" ...

不好使阿~
14#
发表于 2007-2-18 21:54:14 | 只看该作者

晕~~~~~~~~~

15#
发表于 2007-2-18 21:56:40 | 只看该作者
搞电脑的MM。佩服!
您需要登录后才可以回帖 登录 | 注册(开放注册)

本版积分规则

手机访问本页请
扫描左边二维码
         本网站声明
本网站所有内容为网友上传,若存在版权问题或是相关责任请联系站长!
站长联系QQ:7123767   myubbs.com
         站长微信:7123767
请扫描右边二维码
www.myubbs.com

小黑屋|手机版|Archiver|长沙学院论坛 ( 琼ICP备10001196号-2 )

GMT+8, 2024-4-19 18:44 , Processed in 0.076761 second(s), 14 queries .

Powered by 高考信息网 X3.3

© 2001-2013 大学排名

快速回复 返回顶部 返回列表