console
<div class="father-box">
<div class="box">续费¥8.8></div>
</div>
.box{
background: #7a7a7a;
color: #fff;
border-radius: 10px;
padding: 0 10px;
width: fit-content;
position: relative;
overflow: hidden;
}
.box::after{
position: absolute;
content: "";
height: 100%;
width: 0px;
background: #fff;
left: 0;
box-shadow: 0 0 5px 3px #fff;
animation-name: buling;
animation-delay: 0;
animation-duration: 2s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@keyframes buling{
0%{
opacity: 0;
left: 0;
}
70%{
opacity: 0;
left: 0;
}
71%{
opacity: 1;
left: 0;
}
100%{
left: 100%;
}
}