css - 圆圈到达屏幕的最右角后如何使圆圈保持不变?
问题描述
现在,动画使圆圈从左到右移动。但是一旦动画结束,它会再次向左滑动。如何使圆圈到达屏幕的最右上角后保持在右上角?
html:
<div class="circle"> </div>
CSS:
.circle{
height: 100px;
width: 100px;
background-color: green;
border-radius: 100px;
-webkit-animation-name: move;
-webkit-animation-duration: 20s;
animation-name: move;
animation-duration: 20s;
}
@-webkit-keyframes move {
0% {
background-color:red;
transform: translateX(0vw);
}
100% {
background-color:pink;
transform: translateX(90vw);
}
}
解决方案
推荐阅读
- c# - ASP.NET MVC:错误 CS0311:类型“XYZ”不能用作泛型方法中的参数“TContext”
- r - 使用来自另一列的替换值进行逐行模式替换
- r - 如何从 st_sample (R package sf) 中获取六角型样本?
- r - 如何在 R(igraph) 中检查我的网络是否是无标度的
- javascript - React UseEffects 显示警告“方法表达式不是函数类型”
- c - 在 C 中使用 fscanf 获取输入
- database - 在 Laravel 中使用随机条目更新数据库
- javascript - 将 cordova-plugin-firebase-authentication 身份验证转换为 Firebase JS-SDK 身份验证
- c - 如何将库路径添加到makefile?
- marklogic - 禁用计划任务的 MarkLogic 功能