CSS3白云飘动动画特效

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS3白云飘动动画特效</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            height: 100vh;
            overflow: hidden;
            background: linear-gradient(to bottom, #87CEEB 0%, #E0F7FA 100%);
        }
        
        .sky {
            position: relative;
            width: 100%;
            height: 100%;
        }
        
        .cloud {
            position: absolute;
            background: white;
            border-radius: 50%;
            filter: blur(5px);
            opacity: 0.8;
            animation: float linear infinite;
        }
        
        .cloud:nth-child(1) {
            width: 150px;
            height: 60px;
            top: 20%;
            left: 10%;
            animation-duration: 60s;
            box-shadow: 
                20px 20px 0 0 white,
                40px 10px 0 0 white,
                60px 20px 0 0 white;
        }
        
        .cloud:nth-child(2) {
            width: 200px;
            height: 80px;
            top: 30%;
            left: 40%;
            animation-duration: 80s;
            animation-delay: 10s;
            box-shadow: 
                30px 30px 0 0 white,
                60px 20px 0 0 white,
                90px 30px 0 0 white;
        }
        
        .cloud:nth-child(3) {
            width: 180px;
            height: 70px;
            top: 50%;
            left: 20%;
            animation-duration: 70s;
            animation-delay: 5s;
            box-shadow: 
                25px 25px 0 0 white,
                50px 15px 0 0 white,
                75px 25px 0 0 white;
        }
        
        .cloud:nth-child(4) {
            width: 120px;
            height: 50px;
            top: 60%;
            left: 70%;
            animation-duration: 50s;
            animation-delay: 15s;
            box-shadow: 
                15px 15px 0 0 white,
                30px 10px 0 0 white,
                45px 15px 0 0 white;
        }
        
        @keyframes float {
            0% {
                transform: translateX(0) translateY(0);
            }
            25% {
                transform: translateX(50px) translateY(-10px);
            }
            50% {
                transform: translateX(100px) translateY(0);
            }
            75% {
                transform: translateX(50px) translateY(10px);
            }
            100% {
                transform: translateX(0) translateY(0);
            }
        }
        
        .footer {
            position: absolute;
            bottom: 10px;
            width: 100%;
            text-align: center;
            font-family: Arial, sans-serif;
            color: #333;
        }
        
        .footer a {
            color: #0066cc;
            text-decoration: none;
        }
        
        .footer a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <div class="sky">
        <div class="cloud"></div>
        <div class="cloud"></div>
        <div class="cloud"></div>
        <div class="cloud"></div>
    </div>
    
    <div class="footer">

    </div>
</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值