css+js实现马年新年倒计时十二生肖时钟带音效新年快乐烟花代码

代码语言:html

所属分类:动画

代码描述:css+js实现马年新年倒计时十二生肖时钟带音效新年快乐烟花代码

代码标签: css js 马年 新年 倒计时 十二 生肖 时钟 音效 快乐 烟花 代码

下面为部分代码预览,完整代码请点击下载或在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>
        /* --- 基础样式 --- */
        body {
            margin: 0;
            padding: 0;
            background-color: #550000;
            background-image: radial-gradient(circle at 50% 50%, #800000 0%, #330000 100%);
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            overflow: hidden;
            font-family: "Microsoft YaHei", "SimHei", serif;
            color: #ffd700;
        }

        /* 纹理背景 */
        body::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0.1;
            background: repeating-linear-gradient(45deg, #ffd700 0, #ffd700 1px, transparent 0, transparent 50%);
            background-size: 20px 20px;
            pointer-events: none;
        }

        /* --- 烟花层 --- */
        #fireworks {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 20;
        }

        /* --- 时钟主体 --- */
        .clock-container {
            position: relative;
            width: 380px;
            height: 380px;
            border-radius: 50%;
            background: radial-gradient(circle, #b30000 0%, #4d0000 100%);
            box-shadow: 0 0 0 8px #660000, 0 0 0 12px #ffd700, 0 0 80px rgba(0,0,0,0.8);
            display: flex;
      .........完整代码请登录后点击上方下载按钮下载查看

网友评论0