代码:
.shine-box {
width: 500px;
height: 100px;
margin: auto;
padding-top: 60px;
border-radius: 10px;
text-align: center;
background-color: black;
font-weight: bolder;
}
.shine-span {
background: #656565 linear-gradient(to left, transparent, #fff, transparent) no-repeat 0 0;
background-size: 20% 100%;
background-position: 0 0;
background-clip: text;
-webkit-background-clip: text;
color: transparent;
animation: shine 3s infinite;
}
@keyframes shine {
from {
background-position: 0% 0%;
}
to {
background-position: 130% 100%;
}
}
结束;