<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>css3文字颜色更改</title>
</head>
<style>
.site__title {
color: #f35626;
font-family: 微软雅黑;
background-image: -webkit-linear-gradient(92deg, #f35626, #feab3a);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
-webkit-animation: hue 10s infinite linear;
}
@-webkit-keyframes hue {
from {

-webkit-filter: hue-rotate(0deg);
-moz-filter: hue-rotate(0deg);
}
to {
-webkit-filter: hue-rotate(-360deg);
-moz-filter: hue-rotate(-360deg);
}
}
</style>
<body>

<h1 class="site__title">色彩会变</h1>
</body>
</html>

相关文章:

  • 2021-05-27
  • 2021-09-28
  • 2022-12-23
  • 2021-10-05
  • 2021-12-22
  • 2021-12-22
  • 2021-05-11
  • 2021-11-15
猜你喜欢
  • 2022-12-23
  • 2021-11-18
  • 2021-12-22
  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
  • 2021-09-04
相关资源
相似解决方案