※ 效果演示 ※
打字效果的文字特效[修改?示的文字即可]
[根据下面的?明?行共1步]
====2、以下代?放在HTML的<body></body>之?[适?的位置]:
<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("javascript源?大全");
var overMe=0;
function txtTyper(str,idx,idObj,spObj,clr1,clr2,delay,plysnd){
var tmp0=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);}
} 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', 300, 0);}
</script>
<BODY onload=init()>
<DIV class=ttl1 id=ttl0></DIV>
</BODY>
※ 效果演示 ※
升降的文字特殊效果[修改?示的文字即可]
[根据下面的?明?行共1步]
====1、以下代?放在HTML的<body></body>之?[适?的位置]:
<script language="JavaScript">
<!--
done = 0;
step = 4
function anim(yp,yk)
{
if(document.layers) document.layers["napis"].top=yp;
else document.all["napis"].style.top=yp;
if(yp>yk) step = -4
if(yp<60) step = 4
setTimeout('anim('+(yp+step)+','+yk+')', 35);
}
function start()
{
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)
}
}
//-->
</script>
<div id="napis" style="position: absolute;top: -50;color: #000000;font-family:宋体;font-size:9pt;">
<p>
??您的使用!
</p></div>
<script language="JavaScript">
<!--
setTimeout('start()',10);
//-->
</script>
※ 效果演示 ※
彩色文字的特殊效果[推荐使用]
[根据下面的?明?行修改即可共1步]
====1、以下代?放在HTML的<body></body>?即可:[适?的位置]:
<script language="JavaScript">
<!-- Begin
text = "javascript源?大全"; //?示的文字
color1 = "blue"; //文字的?色
color2 = "red"; //??的?色
fontsize = "8"; //字体大小
speed = 100; //??速度 (1000 = 1 秒)
i = 0;
if (navigator.appName == "Netscape") {
document.write("<layer id=a visibility=show></layer><br><br><br>");
}
else {
document.write("<div id=a></div>");
}
function changeCharColor() {
if (navigator.appName == "Netscape") {
document.a.document.write("<center><font face=arial size =" + fontsize + "><font color=" + color1 +
">");
for (var j = 0; j < text.length; j++) {
if(j == i) {
document.a.document.write("<font face=arial color=" + color2 + ">" + Text.charAt(i) + "</font>");
}
else {
document.a.document.write(text.charAt(j));
}
}
document.a.document.write('</font></font></center>');
document.a.document.close();
}
if (navigator.appName == "Microsoft Internet Explorer") {
str = "<center><font face=arial size=" + fontsize + "><font color=" + color1 + ">";
for (var j = 0; j < text.length; j++) {
if( j == i) {
str += "<font face=arial color=" + color2 + ">" + text.charAt(i) + "</font>";
}
else {
str += text.charAt(j);
}
}
str += "</font></font></center>";
a.innerHTML = str;
}
(i == text.length) ? i=0 : i++;
}
setInterval("changeCharColor()", speed);
// End -->
</script>
※ 效果演示 ※
?影文字的特殊效果[适用于IE4++][共3种效果]
放在HTML的<body></body>?即可[适?的位置]:
====1、第一种效果[修改要?示的文字即可]
<div style="width: 350; font-size:15pt; font-family: Arial ; color: red; position: relative; filter:
blur(add=1, direction=45, strength=3)">快??滴工作室</div>
====2、第二种效果[修改要?示的文字即可]
<div style="width: 350; font-size:15pt; font-family: Arial ; color: red; position: relative; filter:
glow(color=ffff00, strength=5)">快??滴工作室</div>
====3、第三种效果[修改要?示的文字即可]
<div style="width: 350; font-size:15pt; font-family: Arial ; color: red; position: relative; filter:
dropshadow(color=000000, offx=3, offy=3, positive=1)"> 快??滴工作室</div>
※ 效果演示 1 2 3 ※
超酷的文字特效[特?推荐][共2步]
====1、?以下代?加入HEML的<head></head>之?:
<script>
<!--//
var x,y
var timer
var i_fontsize=0
var step=0
var thisx,thisy
function handlerMM(e){
x = (document.layers) ? e.pageX : event.clientX
y = (document.layers) ? e.pageY : event.clientY
}
function ringup() {
if (document.all) {
thisx = x
thisy = y
ringup2()
}
}
function ringup2() {
if (i_fontsize<=1000) {
document.all.ring.style.fontSize=i_fontsize
document.all.ring.style.color="rgb(255,"+Math.floor(i_fontsize/6)+","+Math.floor(i_fontsize/6)+")"
document.all.ring.style.posLeft=thisx-(Math.floor(i_fontsize/3))
document.all.ring.style.posTop=thisy-(Math.floor(i_fontsize/1.4))
step+=4
i_fontsize+=step
timer=setTimeout("ringup(2)",50)
}
else {
clearTimeout(timer)
i_fontsize=0
step=0
document.all.ring.style.posTop=-10000
}
}
document.onmousemove = handlerMM;
//-->
</script>
<style>
.ringstyle {
position:absolute;
visibility:visible;
top:-50px;
font-size:5pt;
font-family:Verdana;
color:FF0000
}
.explain {
position:absolute;
top:80px;
left:40px;
width:300px;
color:000000;
text-align:center;
font-size:20pt;
font-family:Times;
}
</style>
====2、?以下代?加入HEML的<body></body之?>
<div id="ring" class="ringstyle">
<p><font color="#FF8080">:-)</font></p>
</div><div id="redirection" class="explain">
<p>移?你的鼠?到?里?看看<a target="_blank" onMouseOver="ringup()"
href="http://www.happydrips.com">是不是很棒的效果</a></p>
</div>
※ 效果演示 ※
逐?逐?的文字特效[推荐使用][适用于IE4++]
(修改?示的文字后根据?明?行共2步)
====1、以下代?放在一?新建?面的HTML的<body></body>?即可:[?面上必?什么都?有]
<html>
<head>
<TITLE>特效</TITLE>
</head>
<script language=javaScript>
<!-- //
var thissize=20
var textfont="??"
var textcolor= new Array()
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"
var message = new Array()
message[0]="http://www.happydrips.com"
message[1]="HappyDrips工作室"
message[2]="??您使用"
message[3]="javascript源?大全"
i_message=0
var i_strength=0
var i_message=0
var timer
function glowtext() {
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)
}
}
}function deglowtext() {
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()
}
}
}
function intermezzo() {
glowdiv.innerText=""
setTimeout("glowtext()",1500)
}
//-->
</script>
<body bgcolor="#000000" onLoad="glowtext()"> //不要忘??
<div id="glowdiv" style="position:absolute;visibility:visible;width:600px;text-align:center;
top:150px;left:50px;font-family:??;font-size:30pt;color:000000"></div>
</body>
</html>
====2、[可??]修改<div>???的代?可以确定文字?示的位置,?色和大小。
top是距离屏幕上面的距离,left是距离坐?的距离。font-size是文字大小,
color是?色。width是DIV?的?度。由于文字是用DIV?控制的,所以在DIV的?度范??不能有其它?容。DIV的位置用??位置(position:absolute)表示。
※ 效果演示 ※