纯css实现气泡浮动背景特效

 
更多

纯css实现气泡浮动背景特效。

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>气泡浮动背景特效 html+css</title>
    <style>
        *{
            margin:0;
            padding:0;
            box-sizing:border-box;
        }
        .qipao_kuang{
            position:fixed;
            top:0;
            left:0;
            width:100%;
            height:100%;
            z-index:-10;
            background-image:linear-gradient(180deg, rgb(78, 168, 241), rgb(37, 91, 241));
        }
        .qipao_bubble{
            position:absolute;
            border-radius:50%;
            border:2px solid #fff;
            box-shadow:inset 0 0 8px #fff;
            animation:flutter 10s infinite;
            opacity:0;
        }
        @keyframes flutter{
            0%{
                transform:translateX(0);
                bottom:-100px;
                opacity:1;
            }
            50%{
                transform:translateX(100px);
                opacity:0.5;
            }
            100%{
                transform:translateX(0px);
                bottom:100%;
                opacity:0;
            }
        }
        .qipao_bubble:nth-child(1){
            left:-10%;
            width:50px;
            height:50px;
            animation-duration:9s;
            animation-delay:0.1s;
        }
        .qipao_bubble:nth-child(2){
            left:15%;
            width:20px;
            height:20px;
            animation-duration:6s;
            animation-delay:1.5s;
        }
        .qipao_bubble:nth-child(3){
            left:20%;
            width:60px;
            height:60px;
            animation-duration:10s;
        }
        .qipao_bubble:nth-child(4){
            left:30%;
            width:30px;
            height:30px;
            animation-duration:5.5s;
            animation-delay:1.5s;
        }
        .qipao_bubble:nth-child(5){
            left:40% x;
            width:50px;
            height:50px;
            animation-duration:12s;
        }
        .qipao_bubble:nth-child(6){
            left:50%;
            width:20px;
            height:20px;
            animation-duration:6s;
            animation-delay:1s;
        }
        .qipao_bubble:nth-child(7){
            left:60%;
            width:40px;
            height:40px;
            animation-duration:8s;
            animation-delay:1s;
        }
        .qipao_bubble:nth-child(8){
            left:65%;
            width:60px;
            height:60px;
            animation-duration:15s;
        }
        .qipao_bubble:nth-child(9){
            left:80%;
            width:55px;
            height:55px;
            animation-duration:9s;
            animation-delay:0.5s;
        }
        .qipao_bubble:nth-child(10){
            left:100%;
            width:40px;
            height:40px;
            animation-duration:12s;
        }
    </style>
</head>
<body>
<div class="qipao_kuang">
    <div class="qipao_bubble"></div>
    <div class="qipao_bubble"></div>
    <div class="qipao_bubble"></div>
    <div class="qipao_bubble"></div>
    <div class="qipao_bubble"></div>
    <div class="qipao_bubble"></div>
    <div class="qipao_bubble"></div>
    <div class="qipao_bubble"></div>
    <div class="qipao_bubble"></div>
    <div class="qipao_bubble"></div>
</div>
这是一段文字,www.phpernote.com !
</body>
</html>

参考地址:http://project-manage.laohuoa.top/login.html

打赏

本文固定链接: https://www.cxy163.net/archives/2952 | 绝缘体

该日志由 绝缘体.. 于 2024年06月21日 发表在 未分类 分类下, 你可以发表评论,并在保留原文地址及作者的情况下引用到你的网站或博客。
原创文章转载请注明: 纯css实现气泡浮动背景特效 | 绝缘体
关键字: , , , ,

纯css实现气泡浮动背景特效:等您坐沙发呢!

发表评论


快捷键:Ctrl+Enter