Team:Uppsala/synbioday
From 2013.igem.org
(Difference between revisions)
Line 10: | Line 10: | ||
<link rel="stylesheet" type="text/css" href="css/style.css"> | <link rel="stylesheet" type="text/css" href="css/style.css"> | ||
<style type="text/css"> | <style type="text/css"> | ||
- | + | #b{background-color:red; width:100px; height: 100px;} | |
</style> | </style> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
Line 45: | Line 45: | ||
</script> | </script> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | var x = document.getElementById(' | + | var x = document.getElementById('b').style.left; |
- | var y = document.getElementById(' | + | var y = document.getElementById('b').style.top; |
var d_x = 75; | var d_x = 75; | ||
var d_y = 100; | var d_y = 100; | ||
Line 55: | Line 55: | ||
if(y < d_y) y = y + interval - 1; //move y by only 1px | if(y < d_y) y = y + interval - 1; //move y by only 1px | ||
- | document.getElementById(' | + | document.getElementById('b').style.left = x+'px'; |
- | document.getElementById(' | + | document.getElementById('b').style.top = y+'px'; |
if ((x + interval < d_x) && (y + interval < d_y)) { | if ((x + interval < d_x) && (y + interval < d_y)) { | ||
Line 169: | Line 169: | ||
- | <div id="countdown" onload="moveImage()"></div> | + | <div id="countdown" ></div> |
- | + | <div id="b" onload="moveImage()"></div> | |
</body> | </body> | ||
</html> | </html> |
Revision as of 20:01, 22 August 2013