Ptite_Perle
A les clefs du forum
Je tiens le trousseau de clefs du forum
Fondatrice Messages : 5857 Venue : 27/06/2009 Je suis : Age : 60 Je vie à : Lyon Humeur : Bonne humeur Mes Points : 120037 Script pour bannière | | Coucou Voici un script pour faire une bannière pour votre pub - Code:
-
<HTML> <HEAD> <TITLE></TITLE> </HEAD> <BODY onload="InitColors(30)">
<DIV ID="Banner" STYLE="border: 1 solid black; width: 468; font: 8 Arial Black; text-align: center; height: 50; background: #FF9900; color: #003366; font-weight: bold; cursor: default"></DIV>
<SCRIPT> var Texts = new Array() Texts[0] = "Banniere" Texts[1] = "pour ta pub" Texts[2] = "rien que pour toi ! ! !" Texts[3] = "http://forumcrea.forumactif.org/" var Colors = new Array() var iSize = 0 var iColor = 0 var iText = 0 function ShowText(){ var tmp = 0 Banner.innerHTML = Texts[iText] Banner.style.color = "#" + Colors[0] iText == Texts.length-1 ? iText=0 : iText++ ChangeSize(1,30) } function ChangeSize(size, max){ if (size >= max){iColor = window.setTimeout("ChangeColor(0)",700); return(true)} Banner.style.fontSize = "" + size + "px" iSize = window.setTimeout("ChangeSize("+(size+2)+","+max+")",30) } function ChangeColor(i){ if (i == Colors.length-1) { window.clearTimeout(iColor) setTimeout("ShowText()",200) } else { Banner.style.color = Colors[i] iColor = window.setTimeout("ChangeColor("+(i+1)+")",10) } } function InitColors(Steps){ var Start = Banner.style.color var End = Banner.style.backgroundColor Start = Start.substring(1,7) End = End.substring(1,7) var StartRed = parseInt(Start.substring(0, 2),16) var StartGreen = parseInt(Start.substring(2, 4),16) var StartBlue = parseInt(Start.substring(4, 6),16) var EndRed = parseInt(End.substring(0, 2),16) var EndGreen = parseInt(End.substring(2, 4),16) var EndBlue = parseInt(End.substring(4, 6),16) GradientPart(StartRed, StartGreen, StartBlue, EndRed, EndGreen, EndBlue, Steps) ShowText() } // convertion decimal ver hexa function Hexa(Dec){ var nb = Dec.toString(16) if (nb.length < 2) {nb = "0" + nb} return(nb) } function GradientPart(dr, dg, db, fr, fg, fb, Step) { cr=dr; cg=dg; cb=db sr=((fr-dr)/Step) // rouge sg=((fg-dg)/Step) // vert sb=((fb-db)/Step) // bleu for (var x = 0; x <= Step; x++) { Colors[x] = Hexa(Math.floor(cr)) + Hexa(Math.floor(cg)) + Hexa(Math.floor(cb)) cr += sr; cg += sg; cb += sb } } </SCRIPT>
</BODY> </HTML> |
| |