![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/414ddeba8cd48ed19ac8a8b162611188.png)
@keyframes move {
0% {
transform: translateX(1000px);
}
100% {
transform: translateX(100x);
}
}
div {
width: 200px;
height: 400px;
background-color: hotpink;
animation-name: move;
animation-duration: 3s;
}
@keyframes move {
from {
transform: translate(0,0);
}
to {
transform: translate(1000px,0);
}
}
div {
width: 100px;
height: 100px;
background-color: hotpink;
animation-name: move;
animation-duration: 2s;
}
@keyframes move {
0% {
transform: translate(0,0);
}
25% {
transform: translate(1000px,0);
}
50% {
transform: translate(1000px,500px);
}
75% {
transform: translate(0,500px);
}
100% {
transform: translate(0,0);
}
}
div {
width: 100px;
height: 100px;
background-color: hotpink;
animation-name: move;
animation-duration:10s;
}