好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

关于@keyframes定义动画的问题_html/css_WEB-ITnose

我想让一个长方形先转30度,再向右走200px距离,然后再转330度,最后走回原位。(代码不考虑兼容性)



div
{
position:relative;
background-color:red;
width:120px;
height:50px;
animation:donghua 5s;
animation-timing-function:linear;
}
@keyframes donghua
{
0% {width:120px;height:50px;left:0px; top:0px;}
25% {transform:rotate(30deg);}
50% {left:200px; top:0px;}
75% {transform:rotate(330deg);}
100% {left:0px; top:0px;}
}



查看更多关于关于@keyframes定义动画的问题_html/css_WEB-ITnose的详细内容...

  阅读:32次