完成曲线运动使用贝塞尔曲线,可以去:贝塞尔曲线设置曲线的弧度
复制参数过来替换 cubic-bezier(.15,.76,.25,.86);
代码如下所示:
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.ball{
height: 60px;
width: 60px;
border-radius: 50%;
position: absolute;
bottom: 10px;
z-index: 10;
left: 10px;
background: red;
}
.run_top_right {
display: block;
animation:
run-right-right 3s 0.4s infinite linear,
run-right-top 3s 0.4s infinite cubic-bezier(.15,.76,.25,.86);
animation-fill-mode: forwards;
}
@keyframes run-right-top {
0% {
bottom: 10px;
}
100% {
bottom:400px;
}
}
@keyframes run-right-right {
0% {
left