你的意思是将css应用于所有三个元素?如果是这样,你只需要这样做:
.a, .b, .c {
width: 15px;
height: 15px;
background: #dbdbdb;
border-radius: 50px;
display: inline-block;
}
.a {animation-delay: 1s;
animation: fade 1s forwards;}
.b {animation-delay: 2s;
animation: fade 2s forwards;}
.c {animation-delay: 3s;
animation: fade 3s forwards;}
@keyframes fade {
0% {opacity:0;}
50% {opacity:1;}
100% {opacity:0;}}?
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
63 次 |
| 最近记录: |