按钮上的紫色会动的,不知道怎么上传动效
<button>CSS 动画按钮</button>
button {
display: block;
border: 0;
color: white;
cursor: pointer;
border-radius: 26px;
font-size: 20px;
padding: 15px 25px;
margin: 60px auto;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
background: #007eaf;
background: linear-gradient(-45deg, #4776E6 50%, #8E54E9 60%, #4776E6 70%);
background-size: 600% 100%;
animation: shine 20s infinite;
animation-delay: 0s;
animation-timing-function: linear;
transition: all 0.3s;
&:active{
transform: scale(0.86);
}
}
@keyframes shine {
0% {
background-position-x: 400%;
}
50% {
background-position-x: 0%;
}
100% {
background-position-x: -400%;
}
}