颜色渐变动画文字

CSS实现颜色渐变动画

代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.title {
color: #48c0c0;
-webkit-animation: hue 5s infinite linear;
}

@keyframes hue {
from {
-webkit-filter: hue-rotate(0deg);
}
to {
-webkit-filter: hue-rotate(360deg);
}
}
</style>
</head>

<body>
<h1 class="title">颜色渐变动画</h1>
</body>

</html>