DeletedUser
Gast
Ich möchte mit Javascript Bilder spiegeln, sowohl horizontal als auch vertikal.
Es klappt auch schon einigermaßen, nur habe ich beim letzten (siehe Quellcode) i-wie einen Fehler, aber komme nicht darauf woran es liegt.
Kann mir vielleicht jemand helfen?
Es klappt auch schon einigermaßen, nur habe ich beim letzten (siehe Quellcode) i-wie einen Fehler, aber komme nicht darauf woran es liegt.
Kann mir vielleicht jemand helfen?
HTML:
<?xml version="1.0" encoding="utf-8" ?>
<!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">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript">
//<![CDATA[
//]]>
</script>
<style type="text/css">
/* <![CDATA[ */
body {
background:#5f9ea0;
}
.imagebox {
background-image: url(http://www.shooter-szene.de/albums/google_logos/4th_birthday.gif);
height: 110px;
width: 1px;
margin: 0px;
padding: 0px;
float: left;
background-position: 1px 0px;
}
.imagebox_2 {
background-image: url(http://www.shooter-szene.de/albums/google_logos/4th_birthday.gif);
height: 1px;
width: 276px;
margin: 0px;
padding: 0px;
float: left;
background-position: 1px 0px;
}
/* ]]> */
</style>
<title>Bilder drehen</title>
</head>
<body>
<div class="imagebox" style="width:276px;"></div>
<p style="clear: both;"></p>
<br />
<script type="text/javascript">
for(var i=0;i<276;i+=1)
{
document.write('<div class="imagebox" style="background-position: '+i+'px 0px"><\/div>\n');
}
</script>
<p style="clear: both;"></p>
<br />
<script type="text/javascript">
for(var i=273;i>0;i-=1)
{
document.write('<div class="imagebox" style="background-position: '+i+'px '+(i/6)+'px"><\/div>\n');
}
</script>
<p style="clear: both;"></p>
<br />
<script type="text/javascript">
for(var i=0;i<110;i+=1)
{
document.write('<div class="imagebox_2" style="background-position: 0px '+i+'px"><\/div>\n');
}
</script>
</body>
</html>