纯CSS3实现文字的渐变动画

版权声明:请不要将我的内容平移到你的博客变成你的名字,尊重知识 https://blog.csdn.net/wangzhneg123/article/details/88060185

效果展示:

源码展示:

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>纯CSS3实现文字的渐变动画</title>
    <style>
        .dv {
            width:1000px;
            height:300px;
            margin:0 auto;
            margin-top:100px;
            font-size:80px;
            text-align:center;
            background:-webkit-linear-gradient(left,#147B96,#E6D205 25%,#147B96 50%,#E6D205 75%,#147B96);
            color:transparent;
            -webkit-background-clip:text;
            background-size:200% 100%;
            animation:masked-animation 1s infinite linear;
        }
        @-webkit-keyframes masked-animation {
            0% {
                background-position:0 0;
            }
            100% {
                background-position:-100% 0;
            }
        }</style>
</head>
<body>
<div class="dv">嗨!我是C3文字渐变的效果</div>




</body>
</html>

猜你喜欢

转载自blog.csdn.net/wangzhneg123/article/details/88060185