|
|||||||||||||||||
|
|
|||||||||||||||||
|
|
|||||||||||||||||
|
Cliquez sur "download" pour télécharger le kit nécessaire. Compatible IE et NS (v4.75 et v6). 1/ Insérer entre HEAD et /HEAD: ou entre BODY et /BODY...
<SCRIPT LANGUAGE="JavaScript">
<!--
// Fading JavaScript (C)1997 Cyril Pannetier - La Petite Boutique Java & JavaScript -
// web : http://www.mygale.org/08/pannetie e-mail : pannetie@mygale.org
// Ce script est librement utilisable. Merci de ne pas effacer ces commentaires.
var hexa = "0123465789ABCDEF";
function DecToHexa(DecNb) {
x = Math.floor(DecNb / 16);
h = hexa.charAt(x);
x = DecNb % 16;
h += hexa.charAt(x);
return h;
}
function Degrade(dr,dg,db,fr,fg,fb,texte) {
steps = texte.length;
cr = dr; cg = dg; cb = db;
sr = (fr - dr) / steps;
sg = (fg - dg) / steps;
sb = (fb - db) / steps;
for (var x = 0; x <= steps; x++) {
document.write('<b><FONT face="comic sans ms,verdana,helvetica,arial" COLOR="#' + DecToHexa(cr) + DecToHexa(cg) + DecToHexa(cb) + '">');
document.write(texte.charAt(x));
document.write('</FONT></b>');
cr += sr; cg += sg; cb += sb;
}
}
//-->
</SCRIPT>
2/ Insérer dans le corps de la page:
à l'emplacement où doit apparaître l'effet <SCRIPT LANGUAGE="JavaScript"> <!-- Degrade(255,0,0,0,0,255,"VOICI UN EXEMPLE... INSCRIVEZ ICI LE TEXTE DE VOTRE CHOIX ! !"); //--> </SCRIPT> |
|||||||||||||||||