/ Published in: JavaScript
Changes shape back and forth from a round element to a square element.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
BR=0; el=false; incr=0; function doOneLoop(x,i) { x.style.borderRadius=BR+'%'; BR+=i; incr=(BR<5) ? 5 : i; if (BR<55) tout=setTimeout('doOneLoop(el,incr)',200); } function doOne() { el=document.getElementById('fx1'); BR=50; incr=-5; tout=setTimeout('doOneLoop(el,incr)',100); }
URL: http://coboldinosaur.com/pages/shapes-art.html