Bonjour,

J'ai mis en place un diaporama automatique sur un site : http://mapl4d.free.fr/

Sur IE le redimensionnement des images est impeccable mais pas sous firefox.

Voici un bout de mon code :

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
<script type="text/javascript">
<!--
var timeDelay = 3;
var Pix = new Array
("delacroix01.jpg"
,"delacroix02.jpg"
,"delacroix03.jpg"
);
var howMany = Pix.length;
timeDelay *= 1000;
var PicCurrentNum = 0;
var PicCurrent = new Image();
function startPix() {
setInterval("slideshow()", timeDelay);
}
function slideshow() {
PicCurrentNum++;
if (PicCurrentNum == howMany) {
PicCurrentNum = 0;
}
PicCurrent.src = Pix[PicCurrentNum];
 
document.getElementById("ChangingPix").src = PicCurrent.src;
document.getElementById("ChangingPix").style.width = 50*PicCurrent.width/100+"px";
document.getElementById("ChangingPix").style.height = 50*PicCurrent.height/100+"px";
}
// End -->
</script>
 
<p align="center">
<img alt="" id="ChangingPix" src="delacroix01.jpg" width="700px" height="548px">
</p>



Merci.