以下修改,亲测有效
非弹窗内动画写法
.submit_btn{
animation: submit_btn 1.5s infinite;
-webkit-animation: submit_btn 1.5s infinite;
}
@keyframes submit_btn {
0%,
20%,
80%,
100% {
transform: scale(1);
}
40%,
50% {
transform: scale(0.9);
}
}
弹窗内写法:在className后增加 :local
弹窗内写法:在className后增加 :local
:global {
.submit_btn :local {
animation: submit_btn 2.5s ease-out;
}
@keyframes submit_btn {
0%,
20%,
80%,
100% {
transform: scale(1);
}
40%,
50% {
transform: scale(0.9);
}
}
}