透明白色花环特效

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>透明白色花环特效</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            overflow: hidden;
            background: #000;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            font-family: 'Arial', sans-serif;
        }
        
        .flower-ring {
            position: relative;
            width: 300px;
            height: 300px;
            animation: rotate 30s linear infinite;
        }
        
        .flower {
            position: absolute;
            width: 40px;
            height: 40px;
            opacity: 0.8;
            filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.7));
        }
        
        .petal {
            position: absolute;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.3) 70%, transparent 100%);
            border-radius: 50% 50% 0 50%;
            transform-origin: bottom right;
        }
        
        @keyframes rotate {
            0% {
                transform: rotate(0deg);
            }
            100% {
                transform: rotate(360deg);
            }
        }
        
        @keyframes pulse {
            0%, 100% {
                opacity: 0.7;
                transform: scale(1);
            }
            50% {
                opacity: 0.9;
                transform: scale(1.1);
            }
        }
        
        .content {
            position: absolute;
            text-align: center;
            color: white;
            z-index: 10;
        }
        
        h1 {
            font-size: 2.5em;
            margin-bottom: 20px;
            text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
        }
        
        .link {
            margin-top: 30px;
        }
        
        a {
            color: #fff;
            text-decoration: none;
            font-size: 1.2em;
            transition: all 0.3s;
            padding: 8px 15px;
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 20px;
            background: rgba(255, 255, 255, 0.1);
        }
        
        a:hover {
            background: rgba(255, 255, 255, 0.2);
            text-shadow: 0 0 5px #fff;
        }
    </style>
</head>
<body>
    <div class="flower-ring" id="flowerRing"></div>
    
    <div class="content">
        <h1>白色花环</h1>
        <p>纯净透明的美丽</p>

    </div>

    <script>
        // 创建花环
        function createFlowerRing() {
            const flowerRing = document.getElementById('flowerRing');
            const flowerCount = 12; // 花朵数量
            const radius = 120; // 花环半径
            
            for (let i = 0; i < flowerCount; i++) {
                const flower = document.createElement('div');
                flower.className = 'flower';
                
                // 计算花朵位置
                const angle = (i * (360 / flowerCount)) * Math.PI / 180;
                const x = radius * Math.cos(angle);
                const y = radius * Math.sin(angle);
                
                flower.style.left = `calc(50% + ${x}px - 20px)`;
                flower.style.top = `calc(50% + ${y}px - 20px)`;
                
                // 创建花瓣
                const petalCount = 5;
                for (let j = 0; j < petalCount; j++) {
                    const petal = document.createElement('div');
                    petal.className = 'petal';
                    petal.style.transform = `rotate(${j * (360 / petalCount)}deg)`;
                    
                    // 添加脉动动画
                    petal.style.animation = `pulse ${2 + Math.random() * 3}s ease-in-out infinite ${j * 0.2}s`;
                    
                    flower.appendChild(petal);
                }
                
                flowerRing.appendChild(flower);
            }
        }
        
        // 页面加载后创建花环
        window.addEventListener('load', createFlowerRing);
    </script>
</body>
</html>

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值