Salut, j'ai ce script qui fonctionne bien, par contre, je voudrai en modifier un paramètre pour optimiser l'affichage sous firefox : passer le letter-spacing à 0.1em;
Quelqu'un pourrait m'aider à inclure un test de navigateur et modifier le retour ?
<SCRIPT LANGUAGE="JavaScript">
var theText2 = "ecnadnet";
function nextSize2(i,textLength) {
return (20*Math.abs( Math.sin(i/(textLength/3.14)))+10);
}
function sizeCycle2(text2,dis2) {
zob2 = ""
for(i = text2.length; i > (-1) ; i--) {
size2 = parseInt(nextSize2(i +dis2,text2.length));
zob2 += "<font color='#910025' style='font-size: "+ size2 +"pt; letter-spacing: 0.3em;'>" +text2.substring(i,i+1)+ "</font>";
}
document.getElementById("theDiv2").innerHTML = zob2;
}
function doWave2(n) {
sizeCycle2(theText2,n)
if (n > theText2.length) {n=0}
tempowave2 = setTimeout("doWave2(" + (n+1) + ")", 250);
}
function stopdoWave2()
{
clearTimeout(tempowave2);
}
function initwave()
{
doWave2(3);
stopdoWave2();
}
</SCRIPT>