Difference between revisions of "Team:Gifu/training"
Line 60: | Line 60: | ||
<div id=base"> | <div id=base"> | ||
<div id="point1"><p id="rib"></p> | <div id="point1"><p id="rib"></p> | ||
− | |||
− | |||
<img id="ribosome" src="https://static.igem.org/mediawiki/2014/5/5f/Gifu_ribosome_renew.png"></img> | <img id="ribosome" src="https://static.igem.org/mediawiki/2014/5/5f/Gifu_ribosome_renew.png"></img> | ||
− | |||
</div> | </div> | ||
</div> | </div> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
<!-- | <!-- | ||
− | var r= | + | var r=280; |
var l=80; | var l=80; | ||
var rad=0; | var rad=0; | ||
Line 77: | Line 74: | ||
var y; | var y; | ||
var yl; | var yl; | ||
− | var kl= | + | var kl=270; |
var k=90; | var k=90; | ||
var m=1; | var m=1; | ||
Line 105: | Line 102: | ||
function spinleft(){ | function spinleft(){ | ||
BBB=setInterval(function(){ | BBB=setInterval(function(){ | ||
− | if(radl | + | if(radl<0){radl=360; k=90;} |
− | else{ | + | else{rad+=2; k+=2}; |
− | + | x=r*Math.cos(Math.PI/180*rad); | |
− | + | y=r*Math.sin(Math.PI/180*rad); | |
− | document.getElementById(" | + | document.getElementById("point1").style.top=y+300+"px"; |
− | document.getElementById(" | + | document.getElementById("point1").style.left=x+480+"px"; |
− | document.getElementById(" | + | document.getElementById("point1").style.transform="rotate("+k+"deg)"; |
},7); | },7); | ||
Line 122: | Line 119: | ||
spinright() | spinright() | ||
}); | }); | ||
+ | |||
+ | |||
//--> | //--> |
Revision as of 16:17, 18 September 2015