纯CSS实现呼吸灯&文字&毛玻璃效果

闲来无事,下一步在平时中应该考虑如何让页面动起来,增加视觉效果

说一说呼吸灯效果吧,我觉得可以用到,就一个brightness滤镜,用动画动起来。

文字效果,在页面中系统名称处可以使用。让页面看起来更有活力一点。

CSS真是今非昔比了。唉  水一篇吧

视频:

录制视频

GIF图:

静态图:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html,
        body,
        #app {
            width: 100%;
            height: 100%;
            margin: 0px;
            padding: 0px;
            background-image: url(./bg.jpg);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .title {
            font-size: 60px;
            vertical-align: middle;
            letter-spacing: 0.2em;
            background: -webkit-linear-gradient(#30cfd0, #330867);
            background-clip: text;
            -webkit-background-clip: text;
            -webkit-text-fill-color: #fff;
            -webkit-text-stroke: 6px transparent;
            margin: 20px;
        }

        .container {
            width: 40%;
            height: 40%;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            border-radius: 40px;
            backdrop-filter: blur(10px);
            box-shadow: 0 0 30px 10px rgba(0, 0, 0, .3);
        }
        .content{
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: space-around;
            align-items: center;
        }

        .item {
            width: 110px;
            height: 116px;
            background-repeat: no-repeat;
            background-size: 100% 100%;
            font-size: 30px;
            font-weight: bold;
            display: flex;
            justify-content: center;
            align-items: center;
            color: #FFF;
        }

        .one {
            background-image: url(./one.png);
            animation: breath_light 3s ease infinite;
        }

        .two {
            background-image: url(./two.png);
            animation: breath_light 3s ease infinite;
        }

        .three {
            background-image: url(./three.png);
            animation: breath_light 3s ease infinite;
        }

        @keyframes breath_light {
            0% {
                filter: brightness(90%);
            }

            50% {
                filter: brightness(220%);


            }

            100% {
                filter: brightness(90%);
            }
        }
    </style>
</head>

<body>
    <div id="app">

        <div class="container">
            <div class="title">呼吸灯&文字&毛玻璃</div>
            <div class="content">
                <div class="item one">12</div>
                <div class="item two">8</div>
                <div class="item three">99</div>
            </div>
        </div>
</body>

</html>

用到的图片资源:

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

是小宗啊?

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值