Link con effetti di testo sullo schermo.
¤ Clicca qui per visualizzare la demo... ¤
<script>
var x,y
var timer
var i_fadestrength=5
var step=1
var maxfontsize=180
var fontsizefactor=maxfontsize/100
var content
function cursorposition(e)
{
x=event.clientX+document.body.scrollLeft
y=event.clientY+document.body.scrollTop
}
function showmessage(whatmessage, whatfont, whatcolor)
{
if (document.all)
{
content="<nobr><font color=" + whatcolor + " face=" + whatfont + ">" + whatmessage + "</font><nobr>"
ring.innerHTML=content
resizemessage()
}
}
function resizemessage()
{
if (document.all)
{
ring.filters.alpha.opacity=Math.floor(100-i_fadestrength)
if (i_fadestrength>=120)
{
i_fadestrength=0;step=1
}
document.all.ring.style.visibility="visible"
document.all.ring.style.fontSize=i_fadestrength*fontsizefactor
document.all.ring.style.posLeft=x-(Math.floor(i_fadestrength/1.3*fontsizefactor))
document.all.ring.style.posTop=y-(Math.floor(i_fadestrength/1.4*fontsizefactor))
step+=1.5
i_fadestrength+=step
timer=setTimeout("resizemessage()",50)
}
}
function hidemessage(e)
{
if (document.all)
{
clearTimeout(timer)
document.all.ring.style.visibility="hidden"
i_fadestrength=5
step=1
}
}
if (document.all)
{
document.onmousemove=cursorposition;
}
if (document.all)
{
document.write("<DIV id='ring' style='position:absolute;font-family:Verdana;filter:alpha(opacity=0);'></DIV>")
document.write("<DIV style='position:relative;'>")
}
</script>
<body>
<a href="http://www.yourlink.com" onMouseOver="showmessage('your message','font','color')" onMouseOut="hidemessage()">some link</a>
</body>
Scarica il Codice...
Stampa la pagina