- 16 Gennaio 2011
- 88
- 0
- Miglior risposta
- 0
Eccomi qui a presentarvi la mia prima raccolta di javascript (la mia passione) Sempre in Aggiornamento 24h/24h :shock: 1_Sfondo in movimento: Descrizione: Questo script agisce sullo sfondo di una pagina così da creare l'illusione dello scorrimento. Demo : Perfavore,
Entra
oppure
Registrati
per vedere i Link!
Passo 1: Copiate il codice qui di seguito riportato e incollatelo nella vostra pagina all'interno dei tag <body> e </body>:
<!-- Prelevato su 100% -->
<script language="JavaScript" type="text/javascript"> <!-- Start // please keep these lines on when you copy the source // made by: Nicolas - Perfavore,
Entra
oppure
Registrati
per vedere i Link!
var background = "nome_dello_sfondo.gif" var speed = 10; browserName = navigator.appName; browserVer = parseInt(navigator.appVersion); if (browserName != "Netscape" || browserVer >= 4.5) { function moveback(movert,movedn,hPos,vPos) { if (arguments[4]) document.body.style.backgroundImage = "url(\"" + arguments[4] + "\")"; if (arguments[5]) document.body.style.backgroundRepeat = arguments[5] if (!isNaN(hPos)) { if ((movert!=0) && (hPos>0)) hPos=-100000 hPos += movert } if (!isNaN(vPos)) { if ((movedn!=0) && (vPos>0)) vPos=-100000 vPos+= movedn } document.body.style.backgroundPosition= hPos + " " + vPos if (isNaN(hPos)) hPos = "\"" + hPos + "\"" if (isNaN(vPos)) vPos = "\"" + vPos + "\"" setTimeout("moveback("+movert+","+movedn+","+hPos+","+vPos+")",speed) } moveback(1,1,0,0, background); } // End --> </script> Descrizione: Questo script agisce sullo sfondo di una pagina così da creare l'illusione da cambiare colore. Demo : Perfavore,
Entra
oppure
Registrati
per vedere i Link!
Passo 1: Copiate il codice qui di seguito riportato e incollatelo nella vostra pagina all'interno dei tag <body> e </body>:
<script language="Javascript">
<!-- Autore: Massimo Giari (webmaster@massimo61.org) --> <!-- function sfondo(form){ temp = ""; for (var i = 0; i < 16; i++) { temp = form.color.value; if (form.color.checked){ document.bgColor = temp ; } } } // --> </script> </head> <body> <form> <table> <tr> <td> <font face="Arial" size="2"> <input type="radio" name="color" value="green" onClick="sfondo(this.form)"> Green</font></td> <td> <font face="Arial" size="2"> <input type="radio" name="color" value="aqua" onClick="sfondo(this.form)"> Aqua</font></td> <td> <font face="Arial" size="2"> <input type="radio" name="color" value="red" onClick="sfondo(this.form)"> Red</font></td> <td> <font face="Arial" size="2"> <input type="radio" name="color" value="olive" onClick="sfondo(this.form)"> Olive</font></td> </tr> <tr> <td> <font face="Arial" size="2"> <input type="radio" name="color" value="teal" onClick="sfondo(this.form)"> Teal</font></td> <td> <font face="Arial" size="2"> <input type="radio" name="color" value="blue" onClick="sfondo(this.form)"> Blue</font></td> <td> <font face="Arial" size="2"> <input type="radio" name="color" value="maroon" onClick="sfondo(this.form)"> Maroon</font></td> <td> <font face="Arial" size="2"> <input type="radio" name="color" value="navy" onClick="sfondo(this.form)"> Navy</font></td> </tr> <tr> <td> <font face="Arial" size="2"> <input type="radio" name="color" value="gray" onClick="sfondo(this.form)"> Grey</font></td> <td> <font face="Arial" size="2"> <input type="radio" name="color" value="lime" onClick="sfondo(this.form)"> Lime</font></td> <td> <font face="Arial" size="2"> <input type="radio" name="color" value="fuschia" onClick="sfondo(this.form)"> Fuschia</font></td> <td> <font face="Arial" size="2"> <input type="radio" name="color" value="white" onClick="sfondo(this.form)"> White</font></td> </tr> <tr> <td> <font face="Arial" size="2"> <input type="radio" name="color" value="purple" onClick="sfondo(this.form)"> Purple</font></td> <td> <font face="Arial" size="2"> <input type="radio" name="color" value="silver" onClick="sfondo(this.form)"> Silver</font></td> <td> <font face="Arial" size="2"> <input type="radio" name="color" value="yellow" onClick="sfondo(this.form)"> Yellow</font></td> <td> <font face="Arial" size="2"> <input type="radio" name="color" value="black" onClick="sfondo(this.form)"> Black</font></td> </tr> </table> </form> <p><center> <font face="Verdana" size="-2">Free JavaScripts da<br> </center><p> 3_Cursore mirino : Descrizione: Questo script agisce sul cursore dando l'illusione di vedere un mirino apposta del cursore. Demo : Demo : Perfavore,
Entra
oppure
Registrati
per vedere i Link!
Si può cambiare colore dalla stringa var hairCol = "#ff0000";
Mettere il codice fra i tag <body></body> : <body>
<script type="text/javascript"> //Crosshairs - Perfavore,
Entra
oppure
Registrati
per vedere i Link!
<!-- if ((document.getElementById) && window.addEventListener || window.attachEvent){ (function(){ var hairCol = "#ff0000"; var d = document; var my = -10; var mx = -10; var r; var vert = ""; var hori = ""; var idx = document.getElementsByTagName('div').length; var thehairs = "<div id='ver"+idx+"' style='position:absolute;top:-2px;left:-2px;" +"height:1px;width:1px;font-size:1px;border-left:dotted 1px "+hairCol+"'><\/div>" +"<div id='hor"+idx+"' style='position:absolute;top:-2px;left:-2px;" +"height:1px;width:1px;font-size:1px;border-top:dotted 1px "+hairCol+"'><\/div>"; document.write(thehairs); var pix = "px"; var domWw = (typeof window.innerWidth == "number"); var domSy = (typeof window.pageYOffset == "number"); if (domWw) r = window; else{ if (d.documentElement && typeof d.documentElement.clientWidth == "number" && d.documentElement.clientWidth != 0) r = d.documentElement; else{ if (d.body && typeof d.body.clientWidth == "number") r = d.body; } } function hairs(){ if (domWw){ vert.height = r.innerHeight - 2 + pix; hori.width = '100%'; } else{ vert.height = r.clientHeight - 2 + pix; hori.width = r.clientWidth + pix; } } function scrl(yx){ var y,x; if (domSy){ y = r.pageYOffset; x = r.pageXOffset; } else{ y = r.scrollTop; x = r.scrollLeft; } return (yx == 0)?y:x; } function mouse(e){ var msy = (domSy)?window.pageYOffset:0; if (!e) e = window.event; if (typeof e.pageY == 'number'){ my = e.pageY - 5 - msy; mx = e.pageX - 4; } else{ my = e.clientY - 6 - msy; mx = e.clientX - 6; } vert.top = scrl(0) + pix; vert.left = mx + pix; hori.top = my + scrl(0) + pix; } function ani(){ vert.top = scrl(0) + pix; hori.top = my + scrl(0) + pix; setTimeout(ani,300); } function init(){ vert = document.getElementById("ver"+idx).style; hori = document.getElementById("hor"+idx).style; hairs(); ani(); } if (window.addEventListener){ window.addEventListener("load",init,false); window.addEventListener("resize",hairs,false); document.addEventListener("mousemove",mouse,false); } else if (window.attachEvent){ window.attachEvent("onload",init); window.attachEvent("onresize",hairs); document.attachEvent("onmousemove",mouse); } })(); }//End. // --> </script> <p><center> </center><p> Descrizione: Questo script agisce sul cursore di una pagina così da creare l'illusione delle palline colorate che ruotano. Demo : Perfavore,
Entra
oppure
Registrati
per vedere i Link!
Passo 1: Copiate il codice qui di seguito riportato e incollatelo nella vostra pagina all'interno dei tag <body> e </body>:
è possibile modificare i colori da questa stringa e si puo aggiungere unaltra pallina colorata aggiungendo questa stringa var aCol = "#ff0000"; alla seguente stringa: var xCol = "#ff0000"; var yCol = "#00ff00"; var zCol = "#0000ff"; <body>
<script type="text/javascript"> <!-- //Trio - Perfavore,
Entra
oppure
Registrati
per vedere i Link!
if ((document.getElementById) && window.addEventListener || window.attachEvent){ (function(){ //Configure here... var xCol = "#ff0000"; var yCol = "#00ff00"; var zCol = "#0000ff"; var n = 6; //number of dots per trail. var t = 40; //setTimeout speed. var s = 0.2; //effect speed. //End. var r,h,w; var d = document; var my = 10; var mx = 10; var stp = 0; var evn = 360/3; var vx = new Array(); var vy = new Array(); var vz = new Array(); var dy = new Array(); var dx = new Array(); var pix = "px"; var strictmod = ((document.compatMode) && document.compatMode.indexOf("CSS") != -1); var domWw = (typeof window.innerWidth == "number"); var domSy = (typeof window.pageYOffset == "number"); var idx = d.getElementsByTagName('div').length; for (i = 0; i < n; i++){ var dims = (i+1)/2; d.write('<div id="x'+(idx+i)+'" style="position:absolute;' +'top:0px;left:0px;width:'+dims+'px;height:'+dims+'px;' +'background-color:'+xCol+';font-size:'+dims+'px"><\/div>' +'<div id="y'+(idx+i)+'" style="position:absolute;top:0px;' +'left:0px;width:'+dims+'px;height:'+dims+'px;' +'background-color:'+yCol+';font-size:'+dims+'px"><\/div>' +'<div id="z'+(idx+i)+'" style="position:absolute;top:0px;' +'left:0px;width:'+dims+'px;height:'+dims+'px;' +'background-color:'+zCol+';font-size:'+dims+'px"><\/div>'); } if (domWw) r = window; else{ if (d.documentElement && typeof d.documentElement.clientWidth == "number" && d.documentElement.clientWidth != 0) r = d.documentElement; else{ if (d.body && typeof d.body.clientWidth == "number") r = d.body; } } function winsize(){ var oh,sy,ow,sx,rh,rw; if (domWw){ if (d.documentElement && d.defaultView && typeof d.defaultView.scrollMaxY == "number"){ oh = d.documentElement.offsetHeight; sy = d.defaultView.scrollMaxY; ow = d.documentElement.offsetWidth; sx = d.defaultView.scrollMaxX; rh = oh-sy; rw = ow-sx; } else{ rh = r.innerHeight; rw = r.innerWidth; } h = rh; w = rw; } else{ h = r.clientHeight; w = r.clientWidth; } } function scrl(yx){ var y,x; if (domSy){ y = r.pageYOffset; x = r.pageXOffset; } else{ y = r.scrollTop; x = r.scrollLeft; } return (yx == 0)?y:x; } function mouse(e){ var msy = (domSy)?window.pageYOffset:0; if (!e) e = window.event; if (typeof e.pageY == 'number'){ my = e.pageY - msy + 16; mx = e.pageX + 6; } else{ my = e.clientY - msy + 16; mx = e.clientX + 6; } if (my > h-65) my = h-65; if (mx > w-50) mx = w-50; } function assgn(){ for (j = 0; j < 3; j++){ dy[j] = my + 50 * Math.cos(stp+j*evn*Math.PI/180) * Math.sin((stp+j*25)/2) + scrl(0) + pix; dx[j] = mx + 50 * Math.sin(stp+j*evn*Math.PI/180) * Math.sin((stp+j*25)/2) * Math.sin(stp/4) + pix; } stp+=s; for (i = 0; i < n; i++){ if (i < n-1){ vx.top = vx[i+1].top; vx.left = vx[i+1].left; vy.top = vy[i+1].top; vy.left = vy[i+1].left; vz.top = vz[i+1].top; vz.left = vz[i+1].left; } else{ vx.top = dy[0]; vx.left = dx[0]; vy.top = dy[1]; vy.left = dx[1]; vz.top = dy[2]; vz.left = dx[2]; } } setTimeout(assgn,t); } function init(){ for (i = 0; i < n; i++){ vx = document.getElementById("x"+(idx+i)).style; vy = document.getElementById("y"+(idx+i)).style; vz = document.getElementById("z"+(idx+i)).style; } winsize(); assgn(); } if (window.addEventListener){ window.addEventListener("resize",winsize,false); window.addEventListener("load",init,false); document.addEventListener("mousemove",mouse,false); } else if (window.attachEvent){ window.attachEvent("onload",init); document.attachEvent("onmousemove",mouse); window.attachEvent("onresize",winsize); } })(); }//End. // --> </script> <p><center> 5_Effetto fade orizzontale : Descrizione: Questo script agisce sulla pagina aprendola orizzontalmente. Demo : Perfavore,
Entra
oppure
Registrati
per vedere i Link!
Passo 1: Copiate il codice qui di seguito riportato e incollatelo nella vostra pagina all'interno dei tag <head> e </head>:
<style>
<!-- .intro{ position:absolute; left:0; top:0; layer-background-color:800080; background-color:800080; border:0.1px solid PURPLE} --> </style> </head> <body> <div id="i1" class="intro"></div><div id="i2" class="intro"></div> <script language="JavaScript1.2"> /* Left-Right Curtain Script- © Dynamic Drive ( Perfavore,
Entra
oppure
Registrati
per vedere i Link!
)For full source code, 100's more free DHTML scripts, and TOS, visit Perfavore,
Entra
oppure
Registrati
per vedere i Link!
*/ <!-- var ns4=document.layers?1:0 var ie4=document.all?1:0 var ns6=document.getElementById&&!document.all?1:0 var speed=20 var temp=new Array() var temp2=new Array() if (ns4){ for (i=1;i<=2;i++){ temp=eval("document.i"+i+".clip") temp2=eval("document.i"+i) temp.width=window.innerWidth/2 temp.height=window.innerHeight temp2.left=(i-1)*temp.width } } else if (ie4||ns6){ var clipright=ns6?window.innerWidth/2*0.98:document.body.clientWidth/2,clipleft=0 for (i=1;i<=2;i++){ temp=ns6?document.getElementById("i"+i).style:eval("document.all.i"+i+".style") temp.width=ns6?window.innerWidth/2*0.98:document.body.clientWidth/2 temp.height=ns6?window.innerHeight-1: document.body.offsetHeight temp.left=(i-1)*parseInt(temp.width) } } function openit(){ window.scrollTo(0,0) if (ns4){ temp[1].right-=speed temp[2].left+=speed if (temp[2].left>window.innerWidth/2) clearInterval(stopit) } else if (ie4||ns6){ clipright-=speed temp[1].clip="rect(0 "+clipright+" auto 0)" clipleft+=speed temp[2].clip="rect(0 auto auto "+clipleft+")" if (clipright<=0){ clearInterval(stopit) if (ns6){ temp[1].display="none" temp[2].display="none" } } } } function gogo(){ stopit=setInterval("openit()",100) } gogo() // --> </script> 6_Palline colorate in fila che seguono il mouse : Descrizione: Questo script agisce sul cursone così da creare l'illusione del movimento. Demo : Perfavore,
Entra
oppure
Registrati
per vedere i Link!
Passo 1: Copiate il codice qui di seguito riportato e incollatelo nella vostra pagina all'interno dei tag <body> e </body>:
<script>
/****************************************** * Cross browser cursor trailer script- By Brian Caputo (bcaputo@icdc.com) * Visit Dynamic Drive ( Perfavore,
Entra
oppure
Registrati
per vedere i Link!
) for full source code* Modified Dec 30th, 02' by DD. This notice must stay intact for use ******************************************/ A=document.getElementById B=document.all; C=document.layers; T1=new Array("http://www.massimo61.org/javascript/grafica/image/trail1.gif",38,35,"http://www.massimo61.org/javascript/grafica/image/trail2.gif",30,31,"http://www.massimo61.org/javascript/grafica/image/trail3.gif",28,26,"http://www.massimo61.org/javascript/grafica/image/trail4.gif",22,21,"http://www.massimo61.org/javascript/grafica/image/trail5.gif",16,16,"http://www.massimo61.org/javascript/grafica/image/trail6.gif",10,10) var offsetx=15 //x offset of trail from mouse pointer var offsety=10 //y offset of trail from mouse pointer nos=parseInt(T1.length/3) rate=50 ie5fix1=0; ie5fix2=0; rightedge=B? document.body.clientWidth-T1[1] : window.innerWidth-T1[1]-20 bottomedge=B? document.body.scrollTop+document.body.clientHeight-T1[2] : window.pageYOffset+window.innerHeight-T1[2] for (i=0;i<nos;i++){ createContainer("CUR"+i,i*10,i*10,i*3+1,i*3+2,"","<img src='"+T1[i*3]+"' width="+T1[(i*3+1)]+" height="+T1[(i*3+2)]+" border=0>") } function createContainer(N,Xp,Yp,W,H,At,HT,Op,St){ with (document){ write((!A && !B) ? "<layer id='"+N+"' left="+Xp+" top="+Yp+" width="+W+" height="+H : "<div id='"+N+"'"+" style='position:absolute;left:"+Xp+"; top:"+Yp+"; width:"+W+"; height:"+H+"; "); if(St){ if (C) write(" style='"); write(St+";' ") } else write((A || B)?"'":""); write((At)? At+">" : ">"); write((HT) ? HT : ""); if (!Op) closeContainer(N) } } function closeContainer(){ document.write((A || B)?"</div>":"</layer>") } function getXpos(N){ if (A) return parseInt(document.getElementById(N).style.left) else if (B) return parseInt(B[N].style.left) else return C[N].left } function getYpos(N){ if (A) return parseInt(document.getElementById(N).style.top) else if (B) return parseInt(B[N].style.top) else return C[N].top } function moveContainer(N,DX,DY){ c=(A)? document.getElementById(N).style : (B)? B[N].style : (C)? C[N] : ""; if (!B){ rightedge=window.innerWidth-T1[1]-20 bottomedge=window.pageYOffset+window.innerHeight-T1[2] } c.left=Math.min(rightedge, DX+offsetx); c.top=Math.min(bottomedge, DY+offsety); } function cycle(){ //if (IE5) if (document.all&&window.print){ ie5fix1=document.body.scrollLeft; ie5fix2=document.body.scrollTop; } for (i=0;i<(nos-1);i++){ moveContainer("CUR"+i,getXpos("CUR"+(i+1)),getYpos("CUR"+(i+1))) } } function newPos(e){ moveContainer("CUR"+(nos-1),(B)?event.clientX+ie5fix1:e.pageX+2,(B)?event.clientY+ie5fix2:e.pageY+2) } function getedgesIE(){ rightedge=document.body.clientWidth-T1[1] bottomedge=document.body.scrollHeight-T1[2] } if (B){ window.onload=getedgesIE window.onresize=getedgesIE } if(document.layers) document.captureEvents(Event.MOUSEMOVE) document.onmousemove=newPos setInterval("cycle()",rate) </script> <body> Descrizione: Questo script agisce sul testo di una pagina così da creare l'illusione dello scorrimento. Demo : Perfavore,
Entra
oppure
Registrati
per vedere i Link!
Passo 1: Copiate il codice qui di seguito riportato e incollatelo nella vostra pagina all'interno dei tag <body> e </body>:
<script language="JavaScript">
<!-- Autore: Massimo Giari (webmaster@massimo61.org) --> <!-- var a = 0 var msg = "Testo da scrivere by Error.System" function scroll() { a = a + 1 if (document.all) document.all.testo.innerHTML=msg.substring(0, a)+"_"; if(a == msg.length + 5) a = 0; else if (document.getElementById) document.getElementById("testo").innerHTML=msg.substring(0, a)+"_"; else document.write(msg) } if (!document.all&&!document.getElementById) scroll() function loadtime(){ if (document.all||document.getElementById) setInterval("scroll()", 120) } onload=loadtime; // --> </script> </head> <body> <span id="testo"></span> <p><center> <font face="Verdana" size="-2">Free JavaScripts da<br> <a href="http://www.massimo61.org/">Free Web Upgrade</a></font> </center><p> Descrizione: Questo script agisce sullo sfondo di una pagina così da creare l'illusione dello scorrimento delle bollicine. Demo : Perfavore,
Entra
oppure
Registrati
per vedere i Link!
Passo 1: Copiate il codice qui di seguito riportato e incollatelo nella vostra pagina all'interno dei tag <body> e </body>:
<script type="text/javascript">
// <![CDATA[ var colours=new Array("#a6f", "#60f", "#60f", "#a6f", "#ccc"); // colours for top, right, bottom and left borders and background of bubbles var bubbles=66; // how many bubbles are moving at any given time /**************************** * JavaScript Bubble Bath * * (c) 2010 mf2fm web-design * * Perfavore,
Entra
oppure
Registrati
per vedere i Link!
** DON'T EDIT BELOW THIS BOX * ****************************/ /* prelevato ed illustrato su Web-Link.it ******************************************/ var swide=800; var shigh=600; var bubb=new Array(); var bubbx=new Array(); var bubby=new Array(); var bubbs=new Array(); window.onload=function() { if (document.getElementById) { var b, i; b=document.createElement("div"); i=b.style; i.position="absolute"; b.setAttribute("id", "bod"); document.body.appendChild(b); set_scroll(); set_width(); var rats, div; for (var i=0; i<bubbles; i++) { rats=createDiv("3px", "3px"); div=createDiv("auto", "auto"); rats.appendChild(div); div=div.style; div.top="1px"; div.left="0px"; div.bottom="1px"; div.right="0px"; div.borderLeft="1px solid "+colours[3]; div.borderRight="1px solid "+colours[1]; div=createDiv("auto", "auto"); rats.appendChild(div); div=div.style; div.top="0px"; div.left="1px"; div.right="1px"; div.bottom="0px" div.borderTop="1px solid "+colours[0]; div.borderBottom="1px solid "+colours[2]; div=createDiv("auto", "auto"); rats.appendChild(div); div=div.style; div.left="1px"; div.right="1px"; div.bottom="1px"; div.top="1px"; div.backgroundColor=colours[4]; div.opacity=0.5; if (document.all) div.filter="alpha(opacity=50)"; b.appendChild(rats); bubb=rats.style; } bubble(); }} function bubble() { var c; for (c=0; c<bubbles; c++) if (!bubby[c] && Math.random()<0.333) { bubb[c].left=(bubbx[c]=Math.floor(swide/6+Math.random()*swide/1.5)-10)+"px"; bubb[c].top=(bubby[c]=shigh)+"px"; bubb[c].width="3px"; bubb[c].height="3px" bubb[c].visibility="visible"; bubbs[c]=3; break; } for (c=0; c<bubbles; c++) if (bubby[c]) update_bubb(c); setTimeout("bubble()", 40); } function update_bubb(i) { if (bubby) { bubby-=bubbs/2+i%2; if (bubby>0) { if (Math.random()<bubbs/shigh*2 && bubbs++<8) { bubb.width=bubbs+"px"; bubb.height=bubbs+"px"; } bubb.top=bubby+"px"; bubbx+=(i%5-2)/5; bubb.left=bubbx+"px"; } else { bubb.visibility="hidden"; bubby=0; return; } } } window.onresize=set_width; function set_width() { if (document.documentElement && document.documentElement.clientWidth) { swide=document.documentElement.clientWidth; shigh=document.documentElement.clientHeight; } else if (typeof(self.innerHeight)=="number") { swide=self.innerWidth; shigh=self.innerHeight; } else if (document.body.clientWidth) { swide=document.body.clientWidth; shigh=document.body.clientHeight; } else { swide=800; shigh=600; } } window.onscroll=set_scroll; function set_scroll() { var sleft, sdown; if (typeof(self.pageYOffset)=="number") { sdown=self.pageYOffset; sleft=self.pageXOffset; } else if (document.body.scrollTop || document.body.scrollLeft) { sdown=document.body.scrollTop; sleft=document.body.scrollLeft; } else if (document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)) { sleft=document.documentElement.scrollLeft; sdown=document.documentElement.scrollTop; } else { sdown=0; sleft=0; } document.getElementById("bod").style.top=sdown+"px"; document.getElementById("bod").style.left=sleft+"px"; } function createDiv(height, width) { var div=document.createElement("div"); div.style.position="absolute"; div.style.height=height; div.style.width=width; div.style.overflow="hidden"; return (div); } // ]]> </script> 9_Effetto scritta Neon : Descrizione: Questo script agisce sulla scritta di una pagina così da creare l'illusione del cambiamento di colore. Demo : Perfavore,
Entra
oppure
Registrati
per vedere i Link!
Passo 1: Copiate il codice qui di seguito riportato e incollatelo nella vostra pagina all'interno dei tag <body> e </body>:
Si può modificare colore dalle seguenti stringhe : var message="Demo" var neonbasecolor="#0000ff" var neontextcolor="#ffff00" <center>
<body> <script language="JavaScript1.2"> <!-- Autore: JavaScript Kit --> <!-- Web Site: JavaScript Kit- Your comprehensive JavaScript, DHTML, CSS, and Ajax stop --> var message="Demo" var neonbasecolor="#0000ff" var neontextcolor="#ffff00" var flashspeed=250 //in milliseconds ///No need to edit below this line///// var n=0 if (document.all||document.getElementById){ document.write('<font color="'+neonbasecolor+'">') for (m=0;m<message.length;m++) document.write('<span id="neonlight'+m+'">'+message.charAt(m)+'</span>') document.write('</font>') } else document.write(message) function crossref(number){ var crossobj=document.all? eval("document.all.neonlight"+number) : document.getElementById("neonlight"+number) return crossobj } function neon(){ //Change all letters to base color if (n==0){ for (m=0;m<message.length;m++) //eval("document.all.neonlight"+m).style.color=neonb asecolor crossref(m).style.color=neonbasecolor } //cycle through and change individual letters to neon color crossref(n).style.color=neontextcolor if (n<message.length-1) n++ else{ n=0 clearInterval(flashing) setTimeout("beginneon()",1500) return } } function beginneon(){ if (document.all||document.getElementById) flashing=setInterval("neon()",flashspeed) } beginneon() </script> </center> Descrizione: Questo script agisce sul testo di una pagina così da creare l'illusione dello scorrimento delle lettere e formare la parola desiderata. Demo : Perfavore,
Entra
oppure
Registrati
per vedere i Link!
Passo 1: Copiate il codice qui di seguito riportato e incollatelo nella vostra pagina all'interno dei tag <body> e </body>:
Modificare testo finale dalla seguente stringa : <div id="matrix">Testo desiderato</div> <center>
<style type="text/css"> .matrix { font-family:Lucida Console, Courier, Monotype; font-size:10pt; text-align:center; width:10px; padding:0px; margin:0px;} </style> </head><body bgcolor="#FFFFFF" link="#333399" vlink="#550000" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"> <script type="text/javascript" language="JavaScript"> <!-- var rows=11; // must be an odd number var speed=66; // lower is faster var reveal=50; // between 0 and 100 // the higher, the faster the word is 'decoded' var alink="http://www.massimo61.org/"; // place to link to // set to alink="" if not needed /***************************\ * The Matrix JavaScripted.. * * (c) 2003 mf2fm web-design * * Perfavore,
Entra
oppure
Registrati
per vedere i Link!
** DON'T EDIT BELOW THIS BOX * \***************************/ var w3c=document.getElementById; var ie45=document.all; var ma_tab, matemp, ma_bod, ma_row, x, y, columns, ma_txt, ma_cho; reveal=reveal/100; var m_coch=new Array(); var m_copo=new Array(); window.onload=function() { if (w3c||ie45) { var matrix=(w3c)?document.getElementById("matrix"):document.all["matrix"]; ma_txt=(w3c)?matrix.firstChild.nodeValue:matrix.innerHTML; ma_txt=" "+ma_txt+" "; columns=ma_txt.length; if (w3c) { while (matrix.childNodes.length) matrix.removeChild(matrix.childNodes[0]); ma_tab=document.createElement("table"); ma_tab.setAttribute("border", 0); ma_tab.setAttribute("align", "center"); ma_tab.style.backgroundColor="#000000"; ma_bod=document.createElement("tbody"); for (x=0; x<rows; x++) { ma_row=document.createElement("tr"); for (y=0; y<columns; y++) { matemp=document.createElement("td"); matemp.setAttribute("id", "Mx"+x+"y"+y); matemp.className="matrix"; matemp.appendChild(document.createTextNode(String.fromCharCode(160))); ma_row.appendChild(matemp); } ma_bod.appendChild(ma_row); } ma_tab.appendChild(ma_bod); matrix.appendChild(ma_tab); } else { ma_tab='<ta'+'ble align="center" border="0" style="background-color:#000000">'; for (var x=0; x<rows; x++) { ma_tab+='<t'+'r>'; for (var y=0; y<columns; y++) ma_tab+='<t'+'d class="matrix" id="Mx'+x+'y'+y+'"> </'+'td>'; ma_tab+='</'+'tr>'; } ma_tab+='</'+'table>'; matrix.innerHTML=ma_tab; } ma_cho=ma_txt; for (x=0; x<columns; x++) { m_copo[x]=0; ma_cho+=String.fromCharCode(32+Math.floor(Math.random()*94)); } x=0; ma_bod=setInterval("mytricks()", speed); } } function mytricks() { var z=x; x=0; for (y=0; y<columns; y++) { x=x+(m_copo[y]==100); ma_row=m_copo[y]%100; if (ma_row && m_copo[y]<100) { if (ma_row<rows+1) { if (w3c) { matemp=document.getElementById("Mx"+(ma_row-1)+"y"+y); matemp.firstChild.nodeValue=m_coch[y]; } else { matemp=document.all["Mx"+(ma_row-1)+"y"+y]; matemp.innerHTML=m_coch[y]; } matemp.style.color="#33ff66"; matemp.style.fontWeight="bold"; } if (ma_row>1 && ma_row<rows+2) { matemp=(w3c)?document.getElementById("Mx"+(ma_row-2)+"y"+y):document.all["Mx"+(ma_row-2)+"y"+y]; matemp.style.fontWeight="normal"; matemp.style.color="#00ff00"; } if (ma_row>2) { matemp=(w3c)?document.getElementById("Mx"+(ma_row-3)+"y"+y):document.all["Mx"+(ma_row-3)+"y"+y]; matemp.style.color="#009900"; } if (ma_row<Math.floor(rows/2)+1) m_copo[y]++; else if (ma_row==Math.floor(rows/2)+1 && m_coch[y]==ma_txt.charAt(y)) zoomer(y); else if (ma_row<rows+2) m_copo[y]++; else if (m_copo[y]<100) m_copo[y]=0; } else if (Math.random()>0.9 && m_copo[y]<100) { if (reveal>Math.random() && (z+1)/columns>Math.random()) m_coch[y]=ma_cho.charAt(y); else m_coch[y]=ma_cho.charAt(Math.floor(Math.random()*ma_cho.length)); m_copo[y]++; } } if (x==columns) clearInterval(ma_bod); } function zoomer(ycol) { var mtmp, mtem, ytmp; if (m_copo[ycol]==Math.floor(rows/2)+1) { for (ytmp=0; ytmp<rows; ytmp++) { if (w3c) { mtmp=document.getElementById("Mx"+ytmp+"y"+ycol); mtmp.firstChild.nodeValue=m_coch[ycol]; } else { mtmp=document.all["Mx"+ytmp+"y"+ycol]; mtmp.innerHTML=m_coch[ycol]; } mtmp.style.color="#33ff66"; mtmp.style.fontWeight="bold"; if (alink) { mtmp.style.cursor="pointer"; mtmp.onclick=function() {window.location.href=alink}; } } mtmp=ma_cho.indexOf(ma_txt.charAt(ycol)); m_copo[ycol]+=199; setTimeout("zoomer("+ycol+")", speed); } else if (m_copo[ycol]>200) { if (w3c) { mtmp=document.getElementById("Mx"+(m_copo[ycol]-201)+"y"+ycol); mtem=document.getElementById("Mx"+(200+rows-m_copo[ycol]--)+"y"+ycol); } else { mtmp=document.all["Mx"+(m_copo[ycol]-201)+"y"+ycol]; mtem=document.all["Mx"+(200+rows-m_copo[ycol]--)+"y"+ycol]; } mtmp.style.fontWeight="normal"; mtem.style.fontWeight="normal"; setTimeout("zoomer("+ycol+")", speed); } else if (m_copo[ycol]==200) m_copo[ycol]=100+Math.floor(rows/2); if (m_copo[ycol]>100 && m_copo[ycol]<200) { if (w3c) { mtmp=document.getElementById("Mx"+(m_copo[ycol]-101)+"y"+ycol); mtmp.firstChild.nodeValue=String.fromCharCode(160); mtem=document.getElementById("Mx"+(100+rows-m_copo[ycol]--)+"y"+ycol); mtem.firstChild.nodeValue=String.fromCharCode(160); } else { mtmp=document.all["Mx"+(m_copo[ycol]-101)+"y"+ycol]; mtmp.innerHTML=String.fromCharCode(160); mtem=document.all["Mx"+(100+rows-m_copo[ycol]--)+"y"+ycol]; mtem.innerHTML=String.fromCharCode(160); } setTimeout("zoomer("+ycol+")", speed); } } // --> </script> </head> <body> <div id="matrix">Testo desiderato</div> Descrizione: Questo script agisce sul testo di una pagina così da creare l'illusione dello scorrimento delle parole intorno al cursore. Demo : Perfavore,
Entra
oppure
Registrati
per vedere i Link!
Passo 1: Copiate il codice qui di seguito riportato e incollatelo nella vostra pagina all'interno dei tag <head> e </head>:
Modificare testo finale dalla seguente stringa : var msg = "Testo desiderato"; <style type="text/css">
/* Circle Text Styles */ #outerCircleText { /* Optional - DO NOT SET FONT-SIZE HERE, SET IT IN THE SCRIPT */ font-style: italic; font-weight: bold; font-family: 'comic sans ms', verdana, arial; color: #000; /* End Optional */ /* Start Required - Do Not Edit */ position: absolute;top: 0;left: 0;z-index: 3000;cursor: default;} #outerCircleText div {position: relative;} #outerCircleText div div {position: absolute;top: 0;left: 0;text-align: center;} /* End Required */ /* End Circle Text Styles */ </style> <script type="text/javascript"> /* Circling text trail- Tim Tilton Website: Perfavore,
Entra
oppure
Registrati
per vedere i Link!
Visit: Perfavore,
Entra
oppure
Registrati
per vedere i Link!
for Original Source and tons of scriptsModified Here for more flexibility and modern browser support Modifications as first seen in Perfavore,
Entra
oppure
Registrati
per vedere i Link!
username:jscheuer1 - This notice must remain for legal use */ ;(function(){ // Your message here (QUOTED STRING) var msg = "Testo desiderato"; /* THE REST OF THE EDITABLE VALUES BELOW ARE ALL UNQUOTED NUMBERS */ // Set font's style size for calculating dimensions // Set to number of desired pixels font size (decimal and negative numbers not allowed) var size = 24; // Set both to 1 for plain circle, set one of them to 2 for oval // Other numbers & decimals can have interesting effects, keep these low (0 to 3) var circleY = 0.75; var circleX = 2; // The larger this divisor, the smaller the spaces between letters // (decimals allowed, not negative numbers) var letter_spacing = 5; // The larger this multiplier, the bigger the circle/oval // (decimals allowed, not negative numbers, some rounding is applied) var diameter = 10; // Rotation speed, set it negative if you want it to spin clockwise (decimals allowed) var rotation = 0.4; // This is not the rotation speed, its the reaction speed, keep low! // Set this to 1 or a decimal less than one (decimals allowed, not negative numbers) var speed = 0.3; ////////////////////// Stop Editing ////////////////////// if (!window.addEventListener && !window.attachEvent || !document.createElement) return; msg = msg.split(''); var n = msg.length - 1, a = Math.round(size * diameter * 0.208333), currStep = 20, ymouse = a * circleY + 20, xmouse = a * circleX + 20, y = [], x = [], Y = [], X = [], o = document.createElement('div'), oi = document.createElement('div'), b = document.compatMode && document.compatMode != "BackCompat"? document.documentElement : document.body, mouse = function(e){ e = e || window.event; ymouse = !isNaN(e.pageY)? e.pageY : e.clientY; // y-position xmouse = !isNaN(e.pageX)? e.pageX : e.clientX; // x-position }, makecircle = function(){ // rotation/positioning if(init.nopy){ o.style.top = (b || document.body).scrollTop + 'px'; o.style.left = (b || document.body).scrollLeft + 'px'; }; currStep -= rotation; for (var d, i = n; i > -1; --i){ // makes the circle d = document.getElementById('iemsg' + i).style; d.top = Math.round(y + a * Math.sin((currStep + i) / letter_spacing) * circleY - 15) + 'px'; d.left = Math.round(x + a * Math.cos((currStep + i) / letter_spacing) * circleX) + 'px'; }; }, drag = function(){ // makes the resistance y[0] = Y[0] += (ymouse - Y[0]) * speed; x[0] = X[0] += (xmouse - 20 - X[0]) * speed; for (var i = n; i > 0; --i){ y = Y += (y[i-1] - Y) * speed; x = X += (x[i-1] - X) * speed; }; makecircle(); }, init = function(){ // appends message divs, & sets initial values for positioning arrays if(!isNaN(window.pageYOffset)){ ymouse += window.pageYOffset; xmouse += window.pageXOffset; } else init.nopy = true; for (var d, i = n; i > -1; --i){ d = document.createElement('div'); d.id = 'iemsg' + i; d.style.height = d.style.width = a + 'px'; d.appendChild(document.createTextNode(msg)); oi.appendChild(d); y = x = Y = X = 0; }; o.appendChild(oi); document.body.appendChild(o); setInterval(drag, 25); }, ascroll = function(){ ymouse += window.pageYOffset; xmouse += window.pageXOffset; window.removeEventListener('scroll', ascroll, false); }; o.id = 'outerCircleText'; o.style.fontSize = size + 'px'; if (window.addEventListener){ window.addEventListener('load', init, false); document.addEventListener('mouseover', mouse, false); document.addEventListener('mousemove', mouse, false); if (/Apple/.test(navigator.vendor)) window.addEventListener('scroll', ascroll, false); } else if (window.attachEvent){ window.attachEvent('onload', init); document.attachEvent('onmousemove', mouse); }; })(); </script>
|
Ultima modifica: