Script文字特效.docx

上传人:b****6 文档编号:5745227 上传时间:2022-12-31 格式:DOCX 页数:9 大小:18.20KB
下载 相关 举报
Script文字特效.docx_第1页
第1页 / 共9页
Script文字特效.docx_第2页
第2页 / 共9页
Script文字特效.docx_第3页
第3页 / 共9页
Script文字特效.docx_第4页
第4页 / 共9页
Script文字特效.docx_第5页
第5页 / 共9页
点击查看更多>>
下载资源
资源描述

Script文字特效.docx

《Script文字特效.docx》由会员分享,可在线阅读,更多相关《Script文字特效.docx(9页珍藏版)》请在冰豆网上搜索。

Script文字特效.docx

Script文字特效

逐隐逐现的文字特效:

--//

varthissize=20

vartextfont="隶书"

vartextcolor=newArray()

textcolor[0]="000000"

textcolor[1]="000000"

textcolor[2]="000000"

textcolor[3]="111111"

textcolor[4]="222222"

textcolor[5]="333333"

textcolor[6]="444444"

textcolor[7]="555555"

textcolor[8]="666666"

textcolor[9]="777777"

textcolor[10]="888888"

textcolor[11]="999999"

textcolor[12]="aaaaaa"

textcolor[13]="bbbbbb"

textcolor[14]="cccccc"

textcolor[15]="dddddd"

textcolor[16]="eeeeee"

textcolor[17]="ffffff"

textcolor[18]="ffffff"

varmessage=newArray()

message[0]=""

message[1]="HappyDrips工作室"

message[2]="谢谢您使用"

message[3]="javascript源码大全"

i_message=0

vari_strength=0

vari_message=0

vartimer

functionglowtext(){ 

if(document.all){

if(i_strength<=17){

glowdiv.innerText=message[i_message]

document.all.glowdiv.style.filter="glow(color="+textcolor[i_strength]+",strength=4)"

i_strength++

timer=setTimeout("glowtext()",100)

}

else{

clearTimeout(timer)

setTimeout("deglowtext()",1500)

}

}

}functiondeglowtext(){ 

if(document.all){

if(i_strength>=0){

glowdiv.innerText=message[i_message]

document.all.glowdiv.style.filter="glow(color="+textcolor[i_strength]+",strength=4)"

i_strength--

timer=setTimeout("deglowtext()",100)

}

else{

clearTimeout(timer)

i_message++

if(i_message>=message.length){i_message=0}

i_strength=0

intermezzo()

}

}

}

functionintermezzo(){ 

glowdiv.innerText=""

setTimeout("glowtext()",1500) 

}

//-->

超酷的文字特效:

阴影文字的特殊效果:

====1、第一种效果[修改要显示的文字即可]

350;font-size:

15pt;font-family:

Arial;color:

red;position:

relative;filter:

 

blur(add=1,direction=45,strength=3)">快乐点滴工作室

====2、第二种效果[修改要显示的文字即可]

350;font-size:

15pt;font-family:

Arial;color:

red;position:

relative;filter:

 

glow(color=ffff00,strength=5)">快乐点滴工作室

====3、第三种效果[修改要显示的文字即可]

350;font-size:

15pt;font-family:

Arial;color:

red;position:

relative;filter:

 

dropshadow(color=000000,offx=3,offy=3,positive=1)">快乐点滴工作室

彩色文字的特殊效果:

--Begin

text="javascript源码大全";//显示的文字

color1="blue";//文字的颜色

color2="red";//转换的颜色

fontsize="8";//字体大小

speed=100;//转换速度(1000=1秒) 

i=0;

if(navigator.appName=="Netscape"){

document.write("


");

}

else{

document.write("");

}

functionchangeCharColor(){

if(navigator.appName=="Netscape"){

document.a.document.write("

">");

for(varj=0;j

if(j==i){

document.a.document.write(""+Text.charAt(i)+"");

}

else{

document.a.document.write(text.charAt(j));

}

}

document.a.document.write('

');

document.a.document.close();

}

if(navigator.appName=="MicrosoftInternetExplorer"){

str="

";

for(varj=0;j

if(j==i){

str+=""+text.charAt(i)+"";

}

else{

str+=text.charAt(j);

}

}

str+="

";

a.innerHTML=str;

}

(i==text.length)?

i=0:

i++;

}

setInterval("changeCharColor()",speed);

//End-->

 

 

升降的文字特殊效果:

--

done=0;

step=4

functionanim(yp,yk)

{

if(document.layers)document.layers["napis"].top=yp;

elsedocument.all["napis"].style.top=yp;

if(yp>yk)step=-4

if(yp<60)step=4

setTimeout('anim('+(yp+step)+','+yk+')',35);

}

functionstart()

{

if(done)return

done=1;

if(navigator.appName=="Netscape"){

document.napis.left=innerWidth/2-145;

anim(60,innerHeight-60)

}

else{

napis.style.left=11;

anim(60,document.body.offsetHeight-60)

}

}

//-->

absolute;top:

-50;color:

#000000;font-family:

宋体;font-size:

9pt;">

谢谢您的使用!

--

setTimeout('start()',10);

//-->

打字效果的文字特效

varlayers=document.layers,style=document.all,both=layers||style,idme=908601;

if(layers){layerRef='document.layers';styleRef='';}if(style){layerRef='document.all';styleRef= 

'.style';}

functionwriteOnText(obj,str){

if(layers)with(document[obj]){document.open();document.write(str);document.close();}

if(style)eval(obj+'.innerHTML=str');}

vardispStr=newArray("javascript源码大全");

varoverMe=0;

functiontxtTyper(str,idx,idObj,spObj,clr1,clr2,delay,plysnd){

vartmp0=tmp1='',skip=100;

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);}

}elseif(document.all){

ding.Stop();

setTimeout("ding.Run()",100);}

overMe=1;}elseoverMe=0;

writeOnText(idObj,""+tmp0+"

+"'>"+tmp1+"");

setTimeout("txtTyper('"+str+"',"+idx+",'"+idObj+"','"+spObj+"','"+clr1+"','"+clr2+"',"+delay+","+plysnd+")",delay);}}

functioninit(){txtTyper(dispStr[0],0,'ttl0','ttl1','#339933','#99FF33',300,0);}

淡入淡出的文字效果:

--

functioncheckBrowserForVersion4(){

varx=navigator.appVersion;

y=x.substring(0,4);

if(y>=4)Effect();}

varisNav=(navigator.appName.indexOf("Netscape")!

=-1);

varcolors=newArray

("FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF","F9F9F9","F1F1F1","E9E9E9","E1E1E1","D9D9D9","D1D1D1","C9C9C9","C1C1C1","B9B9B9","B1B1B1","A9A9A9","A1A1A1","999999","919191","898989","818181","797979","717171","696969","616161","595959","515151","494949","414141","393939","313131","292929","212121","191919","111111","090909","000000")

a=0,b=1

functionEffect(){

color=colors[a];

//*改改下面的文字内容即可,可使用HTML语法,但是注意引号不要混用。

双引号内是单引号。

*//

aa="SavepageandGetCode!

EnjoyAllTheseFreeJavascripts......"

if(isNav){document.object1.document.write(aa);document.object1.document.close();}

elseobject1.innerHTML=aa

a+=b;if(a==38)b-=2;if(a==0)b+=2;xx=setTimeout("Effect()",10);}

//-->

====2、以下代码放在HTML的之间[适当的位置]:

absolute;visibility:

show;left:

181px;top:

113px;z-index:

2">

炽热文字的特殊效果:

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

}

functionglowit2(which){

if(document.all.glowtext.filters[0].strength==2)

document.all.glowtext.filters[0].strength=1

else

document.all.glowtext.filters[0].strength=2

}

functionstartglowing(){

if(document.all.glowtext&&glowtext.length){

for(i=0;i

eval('setInterval("glowit('+i+')",150)')

}

elseif(glowtext)

setInterval("glowit2(0)",150)

}

if(document.all)

window.onload=startglowing

状态栏中的文字:

varMESSAGE="javascript源码大全"

varPOSITION=100

varDELAY=5

varscroll=newstatusMessageObject()

functionstatusMessageObject(p,d){

this.msg=MESSAGE

this.out=""

this.pos=POSITION

this.delay=DELAY

this.i=0

this.reset=clearMessage}

functionclearMessage(){

this.pos=POSITION}

functionscroller(){

for(scroll.i=0;scroll.i

scroll.out+=""}

if(scroll.pos>=0)

scroll.out+=scroll.msg

elsescroll.out=scroll.msg.substring(-scroll.pos,scroll.msg.length)

window.status=scroll.out

scroll.out=""

scroll.pos--

if(scroll.pos<-(scroll.msg.length)){

scroll.reset()}

setTimeout('scroller()',scroll.delay)}

functionsnapIn(jumpSpaces,position){

varmsg=scroll.msg

varout=""

for(vari=0;i

{out+=msg.charAt(i)}

for(i=1;i

{out+=""}

out+=msg.charAt(position)

window.status=out

if(jumpSpaces<=1){

position++

if(msg.charAt(position)=='') 

{position++}

jumpSpaces=100-position

}elseif(jumpSpaces>3)

{jumpSpaces*=.75}

else

{jumpSpaces--}

if(position!

=msg.length){

varcmd="snapI

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 经管营销

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1