代码案例
HTML
<div class="flexAlign loading">
<div class="loading_item"></div>
<div class="loading_item"></div>
<div class="loading_item"></div>
</div>
<div class="other_title">安全联动</div>
<div class="flexAlign loading">
<div class="loading_item"></div>
<div class="loading_item"></div>
<div class="loading_item"></div>
</div>
CSS
@keyframes loadingFrame {
to{
opacity: .2;
/* transform: translateY(-0px); */
}
}
.loading_item{
width:5px;
height:5px;
border-radius: 50%;
margin:0 3px;
background-color:#fff;
animation: loadingFrame .8s infinite alternate;
&:nth-child(2){
animation-delay: .3s;
}
&:nth-child(3){
animation-delay: .6s;
}
}
运行结果