css实现字体特效

前端APP 投稿 10200 1 评论

css实现字体特效

css实现字体特效,具体实例看本站的文章留言框上方。


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #colorFont {
            background-image: linear-gradient(to right, red, orange, yellow, green, blue, yellow, orange, red, orange, yellow, green, yellow, orange, red;
            -webkit-text-fill-color: transparent;
            -webkit-background-clip: text;
            -webkit-background-size: 200% 100%;
            -webkit-animation: colorFont-animation 800ms infinite linear;
        }
        @-webkit-keyframes colorFont-animation {
            0%{ background-position: 0 0;}
            100% { background-position: -100% 0;}
        }
    </style>
</head>
<body>
<span id="colorFont">欢迎大家留言交流技术,记得关注我哦!</span>
</body>
</html>

编程笔记 » css实现字体特效

赞同 (44) or 分享 (0)
游客 发表我的评论   换个身份
取消评论

表情
(1)个小伙伴在吐槽
  1. 能够有效地传达意图。
    幻影巫术师 2023-10-06 02:30 (1年前) 回复