超酷的文字特效

 

点击这里看效果


在 <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 {
FONT-SIZE: 5pt; VISIBILITY: visible; COLOR: #ff0000;
FONT-FAMILY: Verdana; POSITION: absolute; TOP: -50px
}
.explain {
FONT-SIZE: 20pt; LEFT: 40px; WIDTH: 300px; COLOR: #000000;
FONT-FAMILY: Times; POSITION: absolute; TOP: 80px; TEXT-ALIGN: center
}
</STYLE>

在 <body> 与 </body> 之间加入:

<DIV class=ringstyle id=ring STYLE="visibility: visible; top: -50; height: 1">
<FONT COLOR="#FFFF00">£</FONT><!-出现的文字/图案>
</DIV>

<DIV class=explain id=redirection style="left: 20px; top: 45px">
<A onmouseover=ringup() >移动你的鼠标到这里来看看是不是很棒的效果</A>
</DIV>