JS特效.docx
《JS特效.docx》由会员分享,可在线阅读,更多相关《JS特效.docx(42页珍藏版)》请在冰豆网上搜索。
JS特效
这都包括文字,菜单,背影,鼠标,图像,等特效~全部是JS类型的,粘过去就可以用@!
逐隐逐现的文字特效
1、以下代码放在一个新建页面的HTML的
区即可:
[页面上必须什么都没有]
特效
--//
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)
}
//-->
//不要忘记写
absolute;visibility:
visible;width:
600px;text-align:
center;
top:
150px;left:
50px;font-family:
隶书;font-size:
30pt;color:
000000">