二话不说直接上代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>渐变</title>
<style>
.test {
font-size: 30px;
text-align: center;
color: #f35626;
background-image: -webkit-linear-gradient(92deg, #f35626, #feab3a);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
-webkit-animation: move 10s infinite linear;
}
@keyframes move {
0% {
-webkit-filter: hue-rotate(0deg);
}
100% {
-webkit-filter: hue-rotate(-360deg);
}
}
</style>
</head>
<body>
<div class="test">我会渐变</div>
</body>
</html>