使用html+css3实现QQ登录界面渐变色效果

效果展示 

代码展示

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

<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 {
            height: 100%;
            overflow: hidden;
        }

        .color {
            position: absolute;
            filter: blur(200px);
        }

        .color:nth-child(1) {
            top: -350px;
            width: 600px;
            height: 600px;
            background: rgb(47, 102, 255);
            animation: colorOne 3s ease infinite alternate;
        }

        @keyframes colorOne {
            0% {
                background: rgb(47, 102, 255);
            }
            25% {
                background: rgb(47, 154, 255);
            }
            50% {
                background: rgb(47, 179, 255);
            }
            75% {
                background: rgb(47, 255, 238);
            }
            100% {
                background: rgb(47, 255, 203);
            }
        }

        .color:nth-child(2) {
            bottom: -150px;
            left: 100px;
            width: 500px;
            height: 500px;
            background: rgb(27, 178, 255);
            animation: colorTwo 3s ease infinite alternate;
        }

        @keyframes colorTwo {
            0% {
                background: rgb(27, 178, 255);
            }
            25% {
                background: rgb(47, 137, 255);
            }
            50% {
                background: rgb(47, 130, 255);
            }
            75% {
                background: rgb(47, 144, 255);
            }
            100% {
                background: rgb(47, 85, 255);
            }
        }

        .color:nth-child(3) {
            bottom: 50px;
            right: 100px;
            width: 500px;
            height: 500px;
            background: rgb(130, 225, 253);
            animation: colorThree 3s ease infinite alternate;
        }

        @keyframes colorThree {
            0% {
                background: rgb(130, 225, 253);
            }
            25% {
                background: rgb(130, 148, 253);
            }
            50% {
                background: rgb(50, 47, 255);
            }
            75% {
                background: rgb(78, 47, 255);
            }
            100% {
                background: rgb(137, 47, 255);
            }
        }

        .color:nth-child(4) {
            top: -300px;
            right: -20px;
            width: 600px;
            height: 600px;
            background: rgb(192, 132, 255);
            animation: colorFour 3s ease infinite alternate;
        }

        @keyframes colorFour {
            0% {
                background: rgb(192, 132, 255);
            }
            25% {
                background: rgb(251, 132, 255);
            }
            50% {
                background: rgb(255, 132, 214);
            }
            75% {
                background: rgb(255, 132, 183);
            }
            100% {
                background: rgb(255, 132, 142);
            }
        }

        .color:nth-child(5) {
            top: 20px;
            left: 40%;
            width: 400px;
            height: 300px;
            background-color: rgb(133, 169, 254);
            animation: colorFive 3s ease infinite alternate;
        }

        @keyframes colorFive {
            0% {
                background: rgb(133, 169, 254);
            }
            25% {
                background: rgb(133, 254, 187);
            }
            50% {
                background: rgb(171, 254, 133);
            }
            75% {
                background: rgb(242, 254, 133);
            }
            100% {
                background: rgb(254, 206, 133);
            }
        }

        .color:nth-child(6) {
            bottom: 20px;
            left: 50%;
            width: 300px;
            height: 300px;
            background-color: rgb(50, 230, 243);
            animation: colorSix 3s ease infinite alternate;
        }

        @keyframes colorSix {
            0% {
                background: rgb(50, 230, 243);
            }
            25% {
                background: rgb(50, 243, 98);
            }
            50% {
                background: rgb(243, 230, 50);
            }
            75% {
                background: rgb(243, 153, 50);
            }
            100% {
                background: rgb(243, 89, 50);
            }
        }
    </style>
</head>

<body>
    <!-- 背景色 -->
    <div class="color"></div>
    <div class="color"></div>
    <div class="color"></div>
    <div class="color"></div>
    <div class="color"></div>
    <div class="color"></div>
</body>

</html>

实现思路

animation + filter

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

super码王

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

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

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

打赏作者

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

抵扣说明:

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

余额充值