1.实现代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<div class="button">
<span>立即下载</span>
</div>
</head>
<body>
<style>
.button {
display: inline-block;
width: 200px;
height: 46px;
line-height: 46px;
color: #ffffff;
font-size: 18px;
border-radius: 27px;
text-align: center;
background-image: linear-gradient(to right, #ff3300 0%, #eb4402 25%, #ffc404 50%, #eb4402 75%, #ff3300 100%);
background-size: 200%;
animation: colorGradient 1.5s infinite;
}
@keyframes colorGradient {
0% {
background-position: 0 0;
}
100% {
background-position: 100% 0;
}
}
</style>
</body>
</html>
2.实现效果: