2
我希望塊從一個點到另一個點。 在小提琴中,您可以看到動畫之後,該塊返回到第一個位置。如何停止我的動畫
我該如何預防?
的CSS
div
{
width:100px;
height:100px;
background:black;
position:relative;
animation:myfirst 2s;
-webkit-animation:myfirst 2s; /* Safari and Chrome */
}
@keyframes myfirst
{
from { left:0px; top:0px; }
to { left:0px; top:200px; }
}
@-webkit-keyframes myfirst /* Safari and Chrome */
{
from { left:0px; top:0px; }
to { left:0px; top:200px; }
}
</style>