前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >CSS 3.0实现会发光加载中特效

CSS 3.0实现会发光加载中特效

作者头像
越陌度阡
发布2020-11-26 10:32:34
6820
发布2020-11-26 10:32:34
举报

给大家分享一个用CSS 3.0实现的会发光的加载中特效,效果如下:

在这里插入图片描述
在这里插入图片描述

以下是代码实现,欢迎大家复制粘贴和收藏。

代码语言:javascript
复制
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS 3.0实现会发光加载中特效</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            font-family: '微软雅黑', sans-serif;
        }

        body {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            background: #000;
        }

        h2 {
            color: #000;
            font-size: 6em;
            display: flex;
        }

        h2 span {
            animation: animate 4s linear infinite;
        }

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

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

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

        h2 span:nth-child(4) {
            animation-delay: 0.3s;
        }

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

        h2 span:nth-child(6) {
            animation-delay: 0.5s;
        }

        h2 span:nth-child(7) {
            animation-delay: 0.6s;
        }

        h2 span:nth-child(8) {
            animation-delay: 0.7s;
        }

        @keyframes animate {

            0%,100% {
                color: #fff;
                filter: blur(2px);
                text-shadow: 0 0 10px #00b3ff,
                    0 0 20px #00b3ff,
                    0 0 40px #00b3ff,
                    0 0 80px #00b3ff,
                    0 0 120px #00b3ff,
                    0 0 200px #00b3ff,
                    0 0 300px #00b3ff,
                    0 0 300px #00b3ff;
            }

            25%,75% {
                color: #000;
                filter: blur(0px);
                text-shadow: none;
            }
        }
    </style>
</head>

<body>
    <h2>
        <span>L</span>
        <span>o</span>
        <span>a</span>
        <span>d</span>
        <span>i</span>
        <span>n</span>
        <span>g</span>
        <span>...</span>
    </h2>
</body>

</html>
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2020/06/02 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档