设置形状动画
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了设置形状动画相关的知识,希望对你有一定的参考价值。
Changes shape back and forth from a round element to a square element.
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); }
以上是关于设置形状动画的主要内容,如果未能解决你的问题,请参考以下文章