博主头像
Cool

行动起来,活在当下

  • 累计撰写 263 篇文章
  • 累计创建 159 个标签
  • 累计收到 0 条评论

目录

css文字渐变

代码

<!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <style>
        .text-gradient {
          background-image: linear-gradient(to right, orange, purple);
          -webkit-background-clip: text;
          color: transparent;
          font-size: 30px;
        }
      </style>
    </head>
    <body>
      <span class="text-gradient">文字渐变</span>
    </body>
    </html>

效果

.text-gradient { background-image: linear-gradient(to right, orange, purple); -webkit-background-clip: text; color: transparent; font-size: 30px; } 文字渐变

那年今日12 月 4 日

    评论区