Loading

css实现文字连续光影特效

代码实现如下:

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Carver玩转css</title>
    <style>
        span {
            color: #0099FF;
            font-family: "Century Gothic", Consolas, "Liberation Mono", Courier, Verdana;
            font-size: 30px;
            animation: spread 1s ease-in-out infinite alternate;
        }

        @keyframes spread {
            to {
                color: #33FFCC;
                text-shadow: 0 0 100px #33FFCC;
            }
        }

        span:nth-child(1) {
            animation-delay: 0s;
        }

        span:nth-child(2) {
            animation-delay: 0.2s;
        }

        span:nth-child(3) {
            animation-delay: 0.4s;
        }

    </style>
</head>
<body>
<div>
    <span>T</span>
    <span>e</span>
    <span>a</span>
</div>
</body>
</html>

 

posted @ 2023-08-17 22:40  Carvers  阅读(113)  评论(0)    收藏  举报