Так хорошо:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" href="st\\\\yle.css" type="text/css">
</head>
<style>
#image {
position:absolute;
background:url("images/1/1.jpg");
width:500px;
height:300px;
}
</style>
<body>
<div id="image"></div>
<script type="text/javascript">
var result = 0;
setTimeout(function() {
result++;
document.getElementById("image").style.left = result + "px";
if (result < 101)
setTimeout(arguments.callee, 20);
}, 0);
</script>
</body>
</html>
а так плохо:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<style>
#image {
position:absolute;
background:url("images/1/1.jpg");
width:500px;
height:300px;
}
</style>
<body>
<div id="image"></div>
<script type="text/javascript">
var result = 0;
setTimeout(function() {
result++;
document.getElementById("image").style.left = result + "px";
if (result < 101)
setTimeout(arguments.callee, 20);
}, 0);
</script>
</body>
</html>
style.css :
#image{
display:block;
}
Мистика!