<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>文本渐变色</title>
<style>
.text-gradient {
color: #6ACBFF;
background: linear-gradient(0deg, rgba(23, 239, 160, 1) 0%, rgba(27, 128, 254, 1) 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
</style>
</head>
<body>
<h1>
<!-- https://stackoverflow.com/questions/49649054/why-is-my-webkit-background-clip-not-working-on-text -->
<!-- https://codepen.io/ItsMalefis/pen/bvjyar -->
<!-- https://developer.mozilla.org/zh-CN/docs/Web/CSS/background-clip -->
<!-- https://blog.csdn.net/m0_61317636/article/details/125970907 -->
<span class="text-gradient">123</span>
</h1>
</body>
</html>
11-21
09-24
4882
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-05
3万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
01-17
3万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)