Voila j'ai essayer d'adapter un script pour remplacer la balise marquee (non reconnu W3C et qui presente quelque bug sous firefox) mais voila mon script fonctionne sous IE mais pas sous firefox. Je ne trouve pas vraiment mon probleme seul chose importante que j'ai trouvé c'est que si j'enleve le doctype XHTML cela fonctionne sous Firefox et IE donc je pense que je ne dois pas respecter une norme XHTML mais je n'ai pas trop de connaissance en JavaScript donc je vous donne ma source si vous trouver mon probleme merci de me l'indiquer.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <style type="text/css"> #fenetre{ position:relative; overflow:hidden; height:30px; width:400px; background-color:#C0C080; } #marqueeH{ color:#002000; width:100%; } </style> <script type="text/javascript"> <!-- // pas de défilement : var pasH=1 function scrollmrqH(){ if ( parseInt(mrqH.style.left) > -l_mrqH ) mrqH.style.left = parseInt(mrqH.style.left)-pasH+"px"; else mrqH.style.left=fenH.offsetWidth; } function init_mrqH(){ mrqH=document.getElementById("marqueeH"); fenH=document.getElementById("fenetre"); fenH.onmouseover=function(){stoc=pasH;pasH=0}; fenH.onmouseout=function(){pasH=stoc}; l_mrqH=fenH.offsetWidth; with(mrqH.style){position="absolute";left=fenH.style.width;} setInterval("scrollmrqH()",18); } onload=init_mrqH; //--> </script> </head> <body> <div id="fenetre"> <div id="marqueeH">TEST DE DEFILEMENT !!! </div> </div> </body> </html>
Partager