2025-08-28 07:21:01 +08:00
|
|
|
|
<!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;
|
|
|
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
body {
|
2025-08-28 08:20:31 +08:00
|
|
|
|
background-color: #f0f2f5;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
color: #333;
|
|
|
|
|
line-height: 1.6;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.container {
|
2025-08-28 08:20:31 +08:00
|
|
|
|
max-width: 1200px;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
margin: 0 auto;
|
2025-08-28 08:20:31 +08:00
|
|
|
|
padding: 20px;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
header {
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin-bottom: 30px;
|
2025-08-28 08:20:31 +08:00
|
|
|
|
padding: 20px 0;
|
|
|
|
|
background-color: #1a5276;
|
|
|
|
|
color: white;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
2025-08-28 07:21:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
h1 {
|
2025-08-28 08:20:31 +08:00
|
|
|
|
font-size: 2.2rem;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
margin-bottom: 10px;
|
2025-08-28 08:20:31 +08:00
|
|
|
|
font-weight: 700;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.quiz-info {
|
|
|
|
|
font-size: 1.1rem;
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
color: #ecf0f1;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
2025-08-28 07:51:28 +08:00
|
|
|
|
.difficulty-indicator {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
padding: 5px 15px;
|
|
|
|
|
border-radius: 20px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
margin-bottom: 15px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.difficulty-easy {
|
|
|
|
|
background-color: #e8f5e9;
|
|
|
|
|
color: #2e7d32;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.difficulty-medium {
|
|
|
|
|
background-color: #fff8e1;
|
|
|
|
|
color: #ff8f00;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.difficulty-hard {
|
|
|
|
|
background-color: #ffebee;
|
|
|
|
|
color: #c62828;
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-28 07:21:01 +08:00
|
|
|
|
.question-section {
|
2025-08-28 08:20:31 +08:00
|
|
|
|
background-color: white;
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
padding: 30px;
|
|
|
|
|
box-shadow: 0 4px 20px rgba(0,0,0,0.08);
|
2025-08-28 07:21:01 +08:00
|
|
|
|
margin-bottom: 30px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.question {
|
2025-08-28 08:20:31 +08:00
|
|
|
|
margin-bottom: 30px;
|
|
|
|
|
padding-bottom: 20px;
|
|
|
|
|
border-bottom: 1px solid #eee;
|
2025-08-28 07:51:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
2025-08-28 08:20:31 +08:00
|
|
|
|
.question:last-child {
|
|
|
|
|
border-bottom: none;
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
padding-bottom: 0;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.question-header {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-bottom: 15px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.question-number {
|
|
|
|
|
font-weight: bold;
|
2025-08-28 08:20:31 +08:00
|
|
|
|
font-size: 1.1rem;
|
|
|
|
|
color: #1a5276;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.question-points {
|
2025-08-28 08:20:31 +08:00
|
|
|
|
background-color: #3498db;
|
|
|
|
|
color: white;
|
|
|
|
|
padding: 4px 10px;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
border-radius: 12px;
|
2025-08-28 08:20:31 +08:00
|
|
|
|
font-size: 0.9rem;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.question-text {
|
2025-08-28 08:20:31 +08:00
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
font-size: 1.1rem;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
line-height: 1.7;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.options {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: 1fr 1fr;
|
2025-08-28 08:20:31 +08:00
|
|
|
|
gap: 15px;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (max-width: 768px) {
|
|
|
|
|
.options {
|
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.option {
|
2025-08-28 08:20:31 +08:00
|
|
|
|
background-color: #f8f9fa;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
border: 1px solid #ddd;
|
2025-08-28 08:20:31 +08:00
|
|
|
|
border-radius: 8px;
|
|
|
|
|
padding: 15px;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
cursor: pointer;
|
2025-08-28 08:20:31 +08:00
|
|
|
|
transition: all 0.3s ease;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.option:hover {
|
2025-08-28 08:20:31 +08:00
|
|
|
|
background-color: #e3f2fd;
|
|
|
|
|
border-color: #90caf9;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.option input {
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-28 08:20:31 +08:00
|
|
|
|
.btn-section {
|
2025-08-28 07:21:01 +08:00
|
|
|
|
text-align: center;
|
|
|
|
|
margin-top: 40px;
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-28 08:20:31 +08:00
|
|
|
|
.submit-btn {
|
|
|
|
|
background-color: #27ae60;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
color: white;
|
|
|
|
|
border: none;
|
|
|
|
|
padding: 12px 30px;
|
2025-08-28 08:20:31 +08:00
|
|
|
|
border-radius: 8px;
|
|
|
|
|
font-size: 1rem;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
cursor: pointer;
|
2025-08-28 08:20:31 +08:00
|
|
|
|
transition: background-color 0.3s ease;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
2025-08-28 08:20:31 +08:00
|
|
|
|
.submit-btn:hover {
|
|
|
|
|
background-color: #219653;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
2025-08-28 08:20:31 +08:00
|
|
|
|
.result-section {
|
|
|
|
|
background-color: white;
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
padding: 30px;
|
|
|
|
|
box-shadow: 0 4px 20px rgba(0,0,0,0.08);
|
2025-08-28 07:21:01 +08:00
|
|
|
|
margin-top: 30px;
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.result-header {
|
2025-08-28 08:20:31 +08:00
|
|
|
|
text-align: center;
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
color: #1a5276;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.result-stats {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
margin-bottom: 30px;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.stat-item {
|
|
|
|
|
text-align: center;
|
|
|
|
|
padding: 15px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.stat-value {
|
|
|
|
|
font-size: 2rem;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
font-weight: bold;
|
|
|
|
|
color: #2c3e50;
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-28 08:32:03 +08:00
|
|
|
|
/* 添加学伴答疑按钮隐藏样式 */
|
|
|
|
|
.ask-xueban-btn {
|
|
|
|
|
display: none;
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
padding: 8px 16px;
|
|
|
|
|
background-color: #3498db;
|
|
|
|
|
color: white;
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ask-xueban-btn.show {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
}
|
2025-08-28 08:20:31 +08:00
|
|
|
|
.stat-label {
|
|
|
|
|
color: #7f8c8d;
|
|
|
|
|
font-size: 0.9rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.explanation {
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
padding: 15px;
|
|
|
|
|
background-color: #f8f9fa;
|
|
|
|
|
border-left: 4px solid #3498db;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.explanation.show {
|
|
|
|
|
display: block;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
2025-08-28 08:20:31 +08:00
|
|
|
|
.correct {
|
2025-08-28 07:21:01 +08:00
|
|
|
|
background-color: #e8f5e9;
|
2025-08-28 08:20:31 +08:00
|
|
|
|
border-color: #81c784;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
2025-08-28 08:20:31 +08:00
|
|
|
|
.incorrect {
|
2025-08-28 07:21:01 +08:00
|
|
|
|
background-color: #ffebee;
|
2025-08-28 08:20:31 +08:00
|
|
|
|
border-color: #e57373;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.navigation-section {
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin: 20px 0;
|
|
|
|
|
padding: 15px;
|
|
|
|
|
background-color: #f5f5f5;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
display: none;
|
2025-08-28 07:21:01 +08:00
|
|
|
|
}
|
2025-08-28 08:20:31 +08:00
|
|
|
|
|
|
|
|
|
.next-btn {
|
|
|
|
|
background-color: #3498db;
|
|
|
|
|
color: white;
|
|
|
|
|
border: none;
|
|
|
|
|
padding: 10px 25px;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
font-size: 0.9rem;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: background-color 0.3s ease;
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.next-btn:hover {
|
|
|
|
|
background-color: #2980b9;
|
|
|
|
|
}
|
|
|
|
|
/* 在现有样式中添加 */
|
|
|
|
|
.ask-xueban-btn.hidden {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
.explanation.show + .ask-xueban-btn {
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
2025-08-28 07:21:01 +08:00
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<div class="container">
|
|
|
|
|
<header>
|
|
|
|
|
<h1>物理知识测验 - 万有引力定律</h1>
|
2025-08-28 07:51:28 +08:00
|
|
|
|
<div class="difficulty-indicator difficulty-medium">当前难度:中等</div>
|
2025-08-28 07:21:01 +08:00
|
|
|
|
<div class="quiz-info">
|
2025-08-28 07:51:28 +08:00
|
|
|
|
共15道题,分三个难度级别。完成当前难度后将根据您的表现推荐下一难度。
|
2025-08-28 07:21:01 +08:00
|
|
|
|
</div>
|
|
|
|
|
</header>
|
|
|
|
|
|
2025-08-28 08:20:31 +08:00
|
|
|
|
<div class="question-section" id="question-container">
|
|
|
|
|
<!-- 题目将通过JavaScript动态生成 -->
|
|
|
|
|
</div>
|
2025-08-28 07:51:28 +08:00
|
|
|
|
|
2025-08-28 08:20:31 +08:00
|
|
|
|
<div class="btn-section">
|
|
|
|
|
<button type="button" class="submit-btn" id="submit-btn">提交答案</button>
|
|
|
|
|
</div>
|
2025-08-28 07:51:28 +08:00
|
|
|
|
|
2025-08-28 08:20:31 +08:00
|
|
|
|
<div class="result-section" id="result-section">
|
|
|
|
|
<div class="result-header">
|
|
|
|
|
<h2>测验结果</h2>
|
2025-08-28 07:51:28 +08:00
|
|
|
|
</div>
|
2025-08-28 08:20:31 +08:00
|
|
|
|
<div class="result-stats">
|
|
|
|
|
<div class="stat-item">
|
|
|
|
|
<div class="stat-value" id="total-score">0</div>
|
|
|
|
|
<div class="stat-label">总分</div>
|
2025-08-28 07:51:28 +08:00
|
|
|
|
</div>
|
2025-08-28 08:20:31 +08:00
|
|
|
|
<div class="stat-item">
|
|
|
|
|
<div class="stat-value" id="correct-count">0</div>
|
|
|
|
|
<div class="stat-label">正确题数</div>
|
2025-08-28 07:51:28 +08:00
|
|
|
|
</div>
|
2025-08-28 08:20:31 +08:00
|
|
|
|
<div class="stat-item">
|
|
|
|
|
<div class="stat-value" id="incorrect-count">0</div>
|
|
|
|
|
<div class="stat-label">错误题数</div>
|
2025-08-28 07:51:28 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-08-28 08:20:31 +08:00
|
|
|
|
<div class="navigation-section" id="navigation-section">
|
|
|
|
|
<div id="navigation-message"></div>
|
|
|
|
|
<button type="button" class="next-btn" id="next-btn">继续</button>
|
2025-08-28 07:21:01 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-08-28 08:20:31 +08:00
|
|
|
|
<!-- 移除原有的<script>标签及内容,替换为外部JS引用 -->
|
|
|
|
|
<script src="physics_quiz.js"></script>
|
2025-08-28 07:21:01 +08:00
|
|
|
|
</body>
|
2025-08-28 08:42:19 +08:00
|
|
|
|
</html>
|
|
|
|
|
<!-- 确保这些元素存在于HTML中 -->
|
|
|
|
|
<div id="question-container"></div>
|
|
|
|
|
<div id="score"></div>
|
|
|
|
|
<button id="submit-btn">提交答案</button>
|
|
|
|
|
<select id="difficulty-select">
|
|
|
|
|
<option value="easy">简单难度</option>
|
|
|
|
|
<option value="medium">中等难度</option>
|
|
|
|
|
<option value="hard">困难难度</option>
|
|
|
|
|
</select>
|
|
|
|
|
<button id="xueban-btn" class="hidden">学伴答疑</button>
|
|
|
|
|
<div id="result-container"></div>
|
|
|
|
|
<audio id="audio-player" controls style="display:none"></audio>
|
|
|
|
|
<button id="record-btn">开始录音</button>
|
|
|
|
|
<button id="upload-btn">上传音频</button>
|
|
|
|
|
<progress id="progress-bar" value="0" max="1"></progress>
|
|
|
|
|
<span id="recording-time">00:00</span>
|