CSS实现文本渐变色

<!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>

在这里插入图片描述

相关推荐

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-20 12:42:05       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-20 12:42:05       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-20 12:42:05       82 阅读
  4. Python语言-面向对象

    2024-04-20 12:42:05       91 阅读

热门阅读

  1. postgreSQL学习指南(基础)

    2024-04-20 12:42:05       41 阅读
  2. Spring boot注解开发mybatis

    2024-04-20 12:42:05       34 阅读
  3. python-基础(2)-数值运算

    2024-04-20 12:42:05       30 阅读
  4. 基于Python的招聘信息爬虫系统的设计与实现

    2024-04-20 12:42:05       40 阅读
  5. 基于K-prototype算法聚类

    2024-04-20 12:42:05       35 阅读
  6. 【备忘】利用FFMpeg读取视频第一帧作为封面

    2024-04-20 12:42:05       43 阅读
  7. Vue3页面的执行过程

    2024-04-20 12:42:05       38 阅读
  8. unity socket udp 连接

    2024-04-20 12:42:05       187 阅读
  9. 数据仓库—维度建模—事实表设计

    2024-04-20 12:42:05       43 阅读
  10. 如何防范XSS?

    2024-04-20 12:42:05       42 阅读