js+css实现浏览器端英文句子单词填空练习代码

代码语言:html

所属分类:其他

代码描述:js+css实现浏览器端英文句子单词填空练习代码,请在edge浏览器中运行才能听到声音,chrome国内tts语音被屏蔽了。

代码标签: 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: 'Segoe UI', 'Microsoft YaHei', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 800px;
            margin: 0 auto;
        }

        /* 头部 */
        .header {
            text-align: center;
            color: white;
            margin-bottom: 30px;
        }

        .header h1 {
            font-size: 2.2em;
            margin-bottom: 10px;
            text-shadow: 0 2px 10px rgba(0,0,0,0.2);
        }

        .header p {
            opacity: 0.9;
            font-size: 1.1em;
        }

        /* 统计面板 */
        .stats-panel {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-bottom: 25px;
            flex-wrap: wrap;
        }

        .stat-box {
            background: rgba(255,255,255,0.2);
            backdrop-filter: blur(10px);
            padding: 15px 25px;
            border-radius: 12px;
            color: white;
            text-align: center;
            min-width: 100px;
        }

        .stat-box .number {
            font-size: 1.8em;
            font-weight: bold;
        }

        .stat-box .label {
            font-size: 0.85em;
            opacity: 0.9;
        }

        /* 主卡片 */
        .main-card {
            background: white;
            border-radius: 20px;
            padding: 35px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.2);
        }

        /* 开始页面 */
        .start-page {
            text-align: center;
            padding: 40px 20px;
        }

        .start-page h2 {
            color: #333;
            margin-bottom: 20px;
            font-size: 1.6em;
        }

        .start-page p {
            color: #666;
            margin-bottom: 30px;
            line-height: 1.8;
        }

        .start-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 16px 50px;
            font-size: 1.2em;
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
        }

        .start-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
        }

        /* 练习页面 */
        .practice-page {
            display: none;
        }

        .progress-bar {
            height: 8px;
            background: #e0e0e0;
            border-radius: 4px;
            margin-bottom: 25px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #667eea, #764ba2);
            border-radius: 4px;
            transition: width 0.5s ease;
        }

        .question-number {
            text-align: center;
            color: #888;
            font-size: 0.95em;
            margin-bottom: 20px;
        }

        .chinese-text {
            text-align: center;
            font-size: 1.5em;
            color: #333;
            margin-bottom: 25px;
            padding: 20px;
            background: #f8f9fa;
            border-radius: 12px;
            line-height: 1.6;
        }

        .senten.........完整代码请登录后点击上方下载按钮下载查看

网友评论0