pixelLeft in firefox

Status
Niet open voor verdere reacties.

Mart53

Nieuwe gebruiker
Lid geworden
7 mei 2008
Berichten
1
Een heel simpel probeerseltje om een schuivend plaatje weer te geven op een webpagina wil wel werken in IE, maar niet in FireFox. Wie weet hoe dat komt?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>probeer maar wat</title>

<script language="JavaScript">
function StartSchuif(){
window.setInterval("Schuif()",50);
};
function Schuif(){
plaat.style.pixelLeft +=5;
if (plaat.style.pixelLeft>=document.body.offsetWidth){
plaat.style.pixelLeft =0;
};
}

</script>
</head>

<body onload="StartSchuif()">
<h1 style="text-align:center">tekst bla bla</h1>
<p>
<img id="plaat" width="100" style="position:absolute; top:20px; left:0px;" src="plaatjes/plaat001.jpg" />
</p>

</body>
</html>
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan