<html>
<head>
<title>Animation</title>
<style type="text/css">
.container
{
background-color: blue;
height: 200px;
width: 200px;
position: relative;
-webkit-animation-name:animate;
-webkit-animation-duration:1s;
}
@-webkit-keyframes animate
{
0%
{
-webkit-transform: translate(0, 0);
}
100%
{
-webkit-transform: translate(100px, 100px);
}
}
</style>
</head>
<body>
<div class="container">
</div>
</body>
</html>
上述代码动画一个对象,但在动画之后它返回到原始位置。如何将它保留在新的位置?这意味着广场不得返回到(0,0)CSS动画对象并保留其新位置
它会为你工作使用的过渡,而不是动画? –