我正在尝试使用CSS3关键帧制作圆形同心圆动画,如下所示:-
.animate-border span:nth-child(1) {
-webkit-animation-duration: 4.2s;
-webkit-animation-timing-function: ease-out;
-webkit-animation-delay: 0.5s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-direction: normal;
-webkit-animation-fill-mode: none;
-webkit-animation-play-state: running;
-webkit-animation-name: pulsei;
animation-duration: 4.2s;
animation-timing-function: ease-out;
animation-delay: 0.5s;
animation-iteration-count: infinite;
animation-direction: normal;
animation-fill-mode: none;
animation-play-state: running;
animation-name: pulsei;
}
@-webkit-keyframes pulsei {
0% {
-webkit-transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
border: 1.5px solid #b3eaf8;
opacity: 1;
width: 5%;
padding-bottom: 5%;
}
100% {
-webkit-transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
opacity: 0;
width: 50%;
border: 1.5px solid #b3eaf8;
padding-bottom: 50%;
}
}
@keyframes pulsei {
0% {
-webkit-transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
border: 1.5px solid #b3eaf8;
opacity: 1;
width: 5%;
padding-bottom: 5%;
}
100% {
-webkit-transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
opacity: 0;
width: 50%;
border: 1.5px solid #b3eaf8;
padding-bottom: 50%;
}
}
我在动画中使用速记,但后来将其更改为单独的属性,但仍然无法正常工作!我在这里做什么错了?