有人可以解释我的小蓝圈来自哪里在白圈的右下边缘吗?它是在我的动画结束时发布的,我不知道它来自哪里,我甚至尝试将动画重置为全部0%,但它没有成功。圆圈随机弹出在我的css动画
这是写在SCSS,我会包括链接到这里codepen:Code Pen
SCSS:
*{box-sizing: border-box;}
.content-wrapper{
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.box{
width: 200px;
height: 200px;
border-radius: 50%;
background-color: #fff;
position: absolute;
}
.ping{
border-radius: 50%;
position: absolute;
z-index: -1;
animation: ping 1.6s ease-out infinite;
}
@keyframes ping{
0% {
width: 60%;
height: 60%;
left: 20%;
top: 20%;
border: 80px solid rgba(102, 217, 255, .5);
}
80% {
width: 160%;
height: 160%;
left: -30%;
top: -30%;
border: 4px solid rgba(102, 217, 255, 1);
}
99% {
opacity: 0;
}
100% {
border: 0px solid rgba(102, 217, 255, 1);
width: 0%;
height: 0%;
left: 0%;
top: 0%;
}
}
HTML:
<div class="content-wrapper">
<div class="box">
<div class="ping"></div>
</div>
</div>
非常感谢你,它清楚地显示出相当不错,我现在用你的代码更新了我的笔。我希望这很好! – LUEH
@LUEH欢迎您。当然,你可以使用你的笔上的代码。 –