Etape 1 :Ajouter dans le <HEAD> :
<script> <!-- // Copyright Peter Gehrig and Urs Dudli at www.24fun.com/ // If you add this script to a script-library or script-archive // you have to add a link to http://www.24fun.com on the webpage // Vos messages ici ! var message = new Array() message[0]="Scripts Dhtml ... Scripts Dhtml ... Scripts Dhtml ..." message[1]="Une compilation des meilleurs scripts du Web." message[2]="Toutes les astuces pour dynamiser vos pages..." // La police de caractères var font_family="Arial" // La taille des caractères var font_size=20 // La couleur des caractères (code RGB) var font_color="255,255,255" // La position verticale de départ du texte // par rapport au bord haut en pixels) var scrollerheight=380 ///////////////////////////////////// var scrollerwidth=400 var startheight=0 for (i=0;i<message.length-1;i++) { message[i]=message[i]+" " } var i_message=0 var i_meslength=0 function initiate() { if (document.all) { document.all.rotationstyle.style.posLeft=-(Math.floor(scrollerwidth/2))+font_size document.all.rotationstyle.style.posTop=startheight document.all.backcolor.style.posLeft=0 document.all.backcolor.style.posTop=0 startscroll() } } function startscroll() { if (i_meslength<=message[i_message].length) { do_rotate="yes" rotationstyle.innerHTML= '<OBJECT ID="rotationobj" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6" STYLE="position:relative;width:'+scrollerwidth+'px;height:'+2*scrollerheight+'px">'+ '<PARAM NAME="Line0001" VALUE="SetLineStyle(0)">'+ '<PARAM NAME="Line0002" VALUE="SetLineColor("+font_color+">'+ '<PARAM NAME="Line0003" VALUE="SetFillColor("+font_color+")">'+ '<PARAM NAME="Line0004" VALUE="SetFont(\''+font_family+'\', '+font_size+', 200, 0, 0, 0)">'+ '<PARAM NAME="Line0005" VALUE="Text(\''+message[i_message].substring(0,i_meslength)+'\', 0, 0, 0)">'+ '</OBJECT>' rotationobj.Rotate(0,0,-90) i_meslength+=2 timer=setTimeout("startscroll()",50) } else { timer=setTimeout("changemessage()",2000) } } function changemessage() { i_message++ if (i_message>=message.length) {i_message=0} i_meslength=0 startscroll() } // --> </script>
Il faut configurer :
Vous pouvez encore modifier plus avant dans le script :
Etape 2 :Ajouter dans la balise <BODY> :
<body onLoad="initiate()" style="width:100%;overflow-x:hidden;overflow-y:hidden">
Etape 3 :Ajouter juste après la balise <BODY> :
<DIV ID="backcolor" STYLE="position:absolute;left:-2000px; background-color:navy;width:30px;height:400px"> </DIV> <DIV ID="rotationstyle" STYLE="position:absolute;left:-2000px;"> <OBJECT ID="rotationobj" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6"> </OBJECT> </DIV>
C'est dans le div ID="backcolor" que l'on configure la couleur, la hauteur et la largeur de la bande verticale.