【发布时间】:2021-04-24 23:53:35
【问题描述】:
Update - The pen below has been updated to show the end results.
我正在尝试使用 css 动画来模拟信号动画,但我似乎无法掌握动画延迟的概念。如果你看这里
http://codepen.io/anon/pen/YwZOmK?editors=110
.real-time-animation {
margin-top: 20px;
position: relative;
transform: scale(0.5) rotate(45deg);
transform-origin: 5% 0%;
}
.real-time-animation>div {
animation: sk-bouncedelay 3s infinite forwards;
}
.circle1 {
animation-delay: 2s;
}
.circle2 {
animation-delay: 1s;
}
@keyframes sk-bouncedelay {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.circle {
position: relative;
width: 16em;
height: 16em;
border-radius: 50%;
background: transparent;
border: 20px solid transparent;
border-top-color: darkblue;
position: absolute;
top: 0;
left: 0;
opacity: 0;
}
.circle2 {
top: 40px;
width: 12em;
height: 12em;
left: 33px;
}
.circle3 {
top: 80px;
width: 8em;
height: 8em;
left: 66px;
}
<div class="real-time-animation">
<div class="circle circle1"> </div>
<div class="circle circle2"> </div>
<div class="circle circle3"> </div>
</div>
您应该能够理解我想要完成的工作。我想从什么都不显示开始,然后在 1 秒后显示第一个小节,然后在 1 秒后显示第二个小节,最后再过 1 秒显示第三个小节。
【问题讨论】:
-
不行,一旦动画完成,一切都需要从头开始。这个简直疯了..