three实现新年快乐烟花粒子效果代码

代码语言:html

所属分类:动画

代码描述:three实现新年快乐烟花粒子效果代码

代码标签: three 新年 快乐 烟花 粒子

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>🎆 2026 新年快乐 🎇</title>
    <style>
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { 
            overflow: hidden; 
            background: #000;
            font-family: 'Arial', sans-serif;
        }
        
        #canvas { display: block; }
        
        #overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            pointer-events: none;
            z-index: 10;
        }
        
        #countdown {
            font-size: 8em;
            font-weight: bold;
            color: transparent;
            background: linear-gradient(45deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #ff6b6b);
            background-size: 400% 400%;
            -webkit-background-clip: text;
            background-clip: text;
            text-shadow: 0 0 40px rgba(255,255,255,0.5);
            animation: gradient 3s ease infinite;
            opacity: 0;
            transition: opacity 0.5s;
        }
        
        #countdown.show { opacity: 1; }
        
        @keyframes gradient {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        
        #message {
            position: fixed;
            bottom: 30px;
            width: 100%;
            text-align: center;
            color: rgba(255,255,255,0.7);
            font-size: 1.2em;
            z-index: 100;
        }
        
        #controls {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 100;
            display: flex;
            gap: 10px;
        }
        
        .btn {
            padding: 10px 20px;
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 25px;
            color: white;
            cursor: pointer;
            font-size: 1em;
            backdrop-filter: blur(10px);
            transition: all 0.3s;
        }
        
        .btn:hover {
            background: rgba(255,255,255,0.2);
            transform: scale(1.05);
        }
        
        #wishes {
            position: fixed;
            left: 20px;
            top: 50%;
            transform: translateY(-50%);
            z-index: 100;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .wish-tag {
            padding: 8px 15px;
            background: linear-gradient(135deg, rgba(255,100,100,0.3), rgba(255,200,100,0.3));
            border-radius: 20px;
            color: white;
            font-size: 0.9em;
            border: 1px solid rgba(255,255,255,0.2);
            animation: float 3s ease-in-out infinite;
        }
        
        .wish-tag:nth-child(2) { animation-delay: 0.5s; }
        .wish-tag:nth-child(3) { animation-delay: 1s; }
        .wish-tag:nth-child(4) { animation-delay: 1.5s; }
        .wish-tag:nth-child(5) { animation-delay: 2s; }
        
        @keyframes float {
            0%, 100% { transform: translateX(0); }
            50% { transform: translateX(10px); }
        }
    </style>
</head>
<body>
    <canvas id="canvas"></canvas>
    
    <div id="overlay">
        <div id="countdown"></div>
    </div>
    
    <div id="controls">
        <button class="btn" id="fireworkBtn">🎆 放烟花</button>
        <button class="btn" id="autoBtn">✨ 自.........完整代码请登录后点击上方下载按钮下载查看

网友评论0