有人可以解釋我的小藍圈來自哪裏在白圈的右下邊緣嗎?它是在我的動畫結束時發佈的,我不知道它來自哪裏,我甚至嘗試將動畫重置爲全部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歡迎您。當然,你可以使用你的筆上的代碼。 –