好的!我将根据您的要求,生成一个完整的多语言问候学习网站,包含翻译、发音、例句、语法、文化、同义词和互动测验等功能。 ```html FILE:index.php ```

🌍 你好 · Hello · 多语言问候

探索全球问候方式,轻松掌握英文「你好」

📖

每日一句

场景例句 & 语法解析

🧠

互动测验

测试你的问候知识

🌐

多语言对照

英语 · 法语 · 西班牙语 · 更多

🎧

发音 & 文化

听标准发音,学问候礼仪

``` ```php FILE:header.php ``` 你好英文 · Hello 多语言学习 ``` ```php FILE:footer.php ``` ``` ```php FILE:admin.php ```

🔧 数据管理面板

查看和编辑存储在 data/data.json 中的问候数据。

当前数据

加载中...
``` ```php FILE:daily/index.php ```

📖 每日一句 · 场景例句

加载中...

🌐 多语言问候对照

语言问候语
英语Hello
法语Bonjour
西班牙语¡Hola
德语Guten Tag
日语こんにちは

🎧 发音 & 文化背景

「Hello」源于19世纪,电话发明后广泛使用。英语国家常见握手或微笑问候。

📝 语法解析

🔁 同义词替换

Hi Hey Greetings Howdy Yo What's up

使用场景:Hi(日常)、Hey(熟悉朋友)、Greetings(正式书面)

``` ```php FILE:quiz/index.php ```

🧠 互动测验 · 问候知识

加载题目中...

``` ```css FILE:css/style.css ``` /* 全局样式 */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: #f0f4f8; color: #1a1a2e; line-height: 1.6; } .container { max-width: 1100px; margin: 0 auto; padding: 0 20px; } /* 导航栏 */ .site-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 1rem 0; box-shadow: 0 4px 15px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 100; } .navbar { display: flex; justify-content: space-between; align-items: center; max-width: 1100px; margin: 0 auto; padding: 0 20px; } .logo { font-size: 1.8rem; font-weight: 700; color: #fff; text-decoration: none; letter-spacing: 1px; } .nav-links { list-style: none; display: flex; gap: 2rem; } .nav-links a { color: rgba(255,255,255,0.9); text-decoration: none; font-weight: 500; transition: color 0.3s; padding: 0.5rem 0; border-bottom: 2px solid transparent; } .nav-links a:hover { color: #fff; border-bottom-color: #fff; } /* 首页英雄区 */ .hero { text-align: center; padding: 4rem 0 2rem; } .hero h1 { font-size: 3rem; background: linear-gradient(135deg, #667eea, #764ba2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .subtitle { font-size: 1.2rem; color: #555; margin-top: 0.5rem; } /* 卡片网格 */ .card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; padding: 2rem 0 4rem; } .card { background: #fff; border-radius: 16px; padding: 2rem; text-align: center; box-shadow: 0 8px 30px rgba(0,0,0,0.08); cursor: pointer; transition: transform 0.3s, box-shadow 0.3s; } .card:hover { transform: translateY(-8px); box-shadow: 0 12px 40px rgba(0,0,0,0.12); } .card-icon { font-size: 2.5rem; margin-bottom: 1rem; } .card h2 { font-size: 1.4rem; margin-bottom: 0.5rem; } .card p { color: #666; } /* 页脚 */ .site-footer { background: #1a1a2e; color: #ccc; text-align: center; padding: 2rem 0; margin-top: 3rem; } .footer-links a { color: #a8b2d1; text-decoration: none; margin: 0 0.3rem; } .footer-links a:hover { color: #fff; } /* 通用按钮 */ .btn { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; border: none; padding: 0.8rem 2rem; border-radius: 30px; font-size: 1rem; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; display: inline-block; margin: 0.5rem; } .btn:hover { transform: scale(1.03); box-shadow: 0 8px 25px rgba(102,126,234,0.4); } .btn-secondary { background: #e0e7ff; color: #4a4a8a; } /* 管理页面 */ .admin-page pre { background: #1e1e2e; color: #cdd6f4; padding: 1.5rem; border-radius: 12px; overflow-x: auto; font-size: 0.9rem; } .data-display { margin: 2rem 0; } /* 每日页面 */ .content-card { background: #fff; padding: 2rem; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); margin: 2rem 0; } .example { font-size: 1.2rem; padding: 0.5rem 0; border-bottom: 1px solid #eee; } .lang-table { width: 100%; border-collapse: collapse; margin: 1rem 0; } .lang-table th, .lang-table td { padding: 0.8rem 1rem; text-align: left; border-bottom: 1px solid #ddd; } .lang-table th { background: #f0f4ff; } .synonyms { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1rem 0; } .synonym { background: #e0e7ff; padding: 0.4rem 1rem; border-radius: 20px; font-weight: 500; color: #4a4a8a; } .culture-note { background: #fffbe6; padding: 1rem; border-radius: 12px; border-left: 4px solid #f0c040; margin: 1rem 0; } /* 测验页面 */ .quiz-page { padding: 2rem 0; } #quiz-container { background: #fff; padding: 2rem; border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,0.08); max-width: 600px; margin: 0 auto; } #question { font-size: 1.3rem; font-weight: 600; margin-bottom: 1.5rem; } .opt-btn { display: block; width: 100%; padding: 0.8rem 1rem; margin: 0.5rem 0; border: 2px solid #e0e7ff; border-radius: 12px; background: #f8faff; cursor: pointer; font-size: 1rem; text-align: left; transition: all 0.2s; } .opt-btn:hover { background: #eef2ff; border-color: #667eea; } .opt-btn.selected { background: #667eea; color: #fff; border-color: #667eea; } #feedback { font-size: 1.1rem; margin: 1rem 0; font-weight: 500; } /* 响应式 */ @media (max-width: 768px) { .navbar { flex-direction: column; gap: 1rem; } .nav-links { gap: 1rem; } .hero h1 { font-size: 2rem; } .card-grid { grid-template-columns: 1fr; } } ``` ```javascript FILE:js/main.js ``` // 全局初始化 document.addEventListener('DOMContentLoaded', function() { console.log('👋 Hello 多语言学习站已加载'); // 为所有带有 data-play 属性的元素添加发音功能 document.querySelectorAll('[data-play]').forEach(el => { el.addEventListener('click', function() { const text = this.dataset.play || 'Hello'; const utterance = new SpeechSynthesisUtterance(text); utterance.lang = 'en-US'; speechSynthesis.speak(utterance); }); }); }); // 通用发音函数(可在内页调用) function speakHello() { const utterance = new SpeechSynthesisUtterance('Hello'); utterance.lang = 'en-US'; speechSynthesis.speak(utterance); } // 简单的测验辅助函数 function showFeedback(elementId, message, isCorrect) { const el = document.getElementById(elementId); if (el) { el.textContent = message; el.style.color = isCorrect ? '#2ecc71' : '#e74c3c'; } } ``` ```json FILE:data/data.json ``` { "siteName": "你好英文·Hello多语言学习", "examples": [ "Hello, how are you today?", "Hello, this is Sarah speaking.", "Hello everyone, welcome to the class!", "Hello, may I help you?", "Hello, long time no see!" ], "translations": { "en": "Hello", "fr": "Bonjour", "es": "¡Hola", "de": "Guten Tag", "ja": "こんにちは", "ko": "안녕하세요", "zh": "你好" }, "synonyms": [ {"word": "Hi", "usage": "日常非正式"}, {"word": "Hey", "usage": "熟人之间"}, {"word": "Greetings", "usage": "正式书面"}, {"word": "Howdy", "usage": "美式口语"}, {"word": "Yo", "usage": "非常随意"} ], "quiz": [ { "q": "\"Hello\" 属于什么词性?", "options": ["名词", "动词", "感叹词", "形容词"], "answer": 2 }, { "q": "以下哪个是 \"Hello\" 的非正式说法?", "options": ["Greetings", "Hi", "How do you do", "Good day"], "answer": 1 }, { "q": "\"Hello\" 最早流行于什么时期?", "options": ["电报时代", "电话发明后", "互联网时代", "古罗马"], "answer": 1 }, { "q": "在英语中,接电话时常用哪个问候?", "options": ["Hello?", "Hey!", "Yo", "Greetings"], "answer": 0 } ] } ``` ```json {"category":"教育工具","description":"多语言问候学习网站,包含翻译发音、场景例句、语法文化、同义词和互动测验,支持PHP动态结构与JSON数据管理"}