js+css实现儿童小学生语文答题小游戏代码

代码语言:html

所属分类:游戏

代码描述:js+css实现儿童小学生语文答题小游戏代码,包含拼音小勇士看拼音选汉字,练习拼读能力 、成语大闯关拼出完整成语,学习成语故事、古诗词填空、填写古诗词,感受诗词之美、词语搭配、学习量词、形容词的正确使用、阅读理解、阅读短文,回答问题、、综合挑战、随机题目,挑战最高分。

代码标签: js+css 儿童 小学生 语文 答题 小游戏 代码

下面为部分代码预览,完整代码请点击下载或在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>🌈 语文小达人 - 三年级学习乐园</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Microsoft YaHei', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            overflow-x: hidden;
        }

        /* 浮动装饰 */
        .floating-decorations {
            position: fixed;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 0;
            overflow: hidden;
        }

        .cloud {
            position: absolute;
            background: rgba(255,255,255,0.3);
            border-radius: 50px;
            animation: floatCloud 20s infinite linear;
        }

        .cloud::before, .cloud::after {
            content: '';
            position: absolute;
            background: inherit;
            border-radius: 50%;
        }

        .cloud-1 { width: 100px; height: 40px; top: 10%; left: -100px; animation-delay: 0s; }
        .cloud-1::before { width: 50px; height: 50px; top: -25px; left: 15px; }
        .cloud-1::after { width: 35px; height: 35px; top: -15px; left: 55px; }

        .cloud-2 { width: 80px; height: 30px; top: 25%; left: -80px; animation-delay: 5s; animation-duration: 25s; }
        .cloud-2::before { width: 40px; height: 40px; top: -20px; left: 10px; }
        .cloud-2::after { width: 30px; height: 30px; top: -12px; left: 40px; }

        .cloud-3 { width: 120px; height: 45px; top: 60%; left: -120px; animation-delay: 10s; animation-duration: 30s; }
        .cloud-3::before { width: 55px; height: 55px; top: -28px; left: 20px; }
        .cloud-3::after { width: 40px; height: 40px; top: -18px; left: 65px; }

        @keyframes floatCloud {
            from { transform: translateX(0); }
            to { transform: translateX(calc(100vw + 200px)); }
        }

        /* 星星装饰 */
        .star {
            position: absolute;
            color: #FFD700;
            font-size: 20px;
            animation: twinkle 2s infinite;
        }

        @keyframes twinkle {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.5; transform: scale(0.8); }
        }

        /* 主容器 */
        .game-container {
            position: relative;
            z-index: 1;
            max-width: 900px;
            margin: 0 auto;
            padding: 20px;
        }

        /* 顶部状态栏 */
        .status-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: rgba(255,255,255,0.95);
            border-radius: 20px;
            padding: 15px 25px;
            margin-bottom: 20px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.1);
        }

        .player-info {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .avatar {
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, #FF6B6B, #FFE66D);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 30px;
            box-shadow: 0 4px 15px rgba(255,107,107,0.4);
            animation: bounce 2s infinite;
        }

        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-5px); }
        }

        .player-name {
            font-size: 18px;
            font-weight: bold;
            color: #333;
        }

        .player-title {
            font-size: 12px;
            color: #888;
            background: linear-gradient(90deg, #667eea, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .stats {
            display: flex;
            gap: 20px;
        }

        .stat-item {
            text-align: center;
            padding: 10px 20px;
            background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
            border-radius: 15px;
        }

        .stat-value {
            font-size: 24px;
            font-weight: bold;
            color: #667eea;
        }

        .stat-label {
            font-size: 12px;
            color: #666;
        }

        /* 主菜单 */
        .main-menu {
            text-align: center;
            padding: 40px 20px;
        }

        .game-title {
            font-size: 48px;
            color: white;
            text-shadow: 4px 4px 0 #FF6B6B, 8px 8px 0 rgba(0,0,0,0.1);
            margin-bottom: 10px;
            animation: titleFloat 3s ease-in-out infinite;
        }

        @keyframes titleFloat {
            0%, 100% { transform: translateY(0) rotate(-1deg); }
            50% { transform: translateY(-10px) rotate(1deg); }
        }

        .game-subtitle {
            font-size: 20px;
            color: rgba(255,255,255,0.9);
            margin-bottom: 40px;
        }

        .menu-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
            max-width: 600px;
            margin: 0 auto;
        }

        .menu-card {
            background: white;
            border-radius: 25px;
            padding: 30px 20px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            position: relative;
            overflow: hidden;
        }

        .menu-card::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
            tr.........完整代码请登录后点击上方下载按钮下载查看

网友评论0