Files
dsProject/dsLightRag/static/YunXiao/physics_quiz.html
2025-08-28 08:32:03 +08:00

325 lines
8.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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 {
background-color: #f0f2f5;
color: #333;
line-height: 1.6;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
header {
text-align: center;
margin-bottom: 30px;
padding: 20px 0;
background-color: #1a5276;
color: white;
border-radius: 10px;
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
h1 {
font-size: 2.2rem;
margin-bottom: 10px;
font-weight: 700;
}
.quiz-info {
font-size: 1.1rem;
margin-bottom: 20px;
color: #ecf0f1;
}
.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;
}
.question-section {
background-color: white;
border-radius: 12px;
padding: 30px;
box-shadow: 0 4px 20px rgba(0,0,0,0.08);
margin-bottom: 30px;
}
.question {
margin-bottom: 30px;
padding-bottom: 20px;
border-bottom: 1px solid #eee;
}
.question:last-child {
border-bottom: none;
margin-bottom: 0;
padding-bottom: 0;
}
.question-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
}
.question-number {
font-weight: bold;
font-size: 1.1rem;
color: #1a5276;
}
.question-points {
background-color: #3498db;
color: white;
padding: 4px 10px;
border-radius: 12px;
font-size: 0.9rem;
}
.question-text {
margin-bottom: 20px;
font-size: 1.1rem;
line-height: 1.7;
}
.options {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 15px;
}
@media (max-width: 768px) {
.options {
grid-template-columns: 1fr;
}
}
.option {
background-color: #f8f9fa;
border: 1px solid #ddd;
border-radius: 8px;
padding: 15px;
cursor: pointer;
transition: all 0.3s ease;
}
.option:hover {
background-color: #e3f2fd;
border-color: #90caf9;
}
.option input {
margin-right: 10px;
}
.btn-section {
text-align: center;
margin-top: 40px;
}
.submit-btn {
background-color: #27ae60;
color: white;
border: none;
padding: 12px 30px;
border-radius: 8px;
font-size: 1rem;
cursor: pointer;
transition: background-color 0.3s ease;
}
.submit-btn:hover {
background-color: #219653;
}
.result-section {
background-color: white;
border-radius: 12px;
padding: 30px;
box-shadow: 0 4px 20px rgba(0,0,0,0.08);
margin-top: 30px;
display: none;
}
.result-header {
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;
font-weight: bold;
color: #2c3e50;
}
/* 添加学伴答疑按钮隐藏样式 */
.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;
}
.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;
}
.correct {
background-color: #e8f5e9;
border-color: #81c784;
}
.incorrect {
background-color: #ffebee;
border-color: #e57373;
}
.navigation-section {
text-align: center;
margin: 20px 0;
padding: 15px;
background-color: #f5f5f5;
border-radius: 8px;
display: none;
}
.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>
</head>
<body>
<div class="container">
<header>
<h1>物理知识测验 - 万有引力定律</h1>
<div class="difficulty-indicator difficulty-medium">当前难度:中等</div>
<div class="quiz-info">
共15道题分三个难度级别。完成当前难度后将根据您的表现推荐下一难度。
</div>
</header>
<div class="question-section" id="question-container">
<!-- 题目将通过JavaScript动态生成 -->
</div>
<div class="btn-section">
<button type="button" class="submit-btn" id="submit-btn">提交答案</button>
</div>
<div class="result-section" id="result-section">
<div class="result-header">
<h2>测验结果</h2>
</div>
<div class="result-stats">
<div class="stat-item">
<div class="stat-value" id="total-score">0</div>
<div class="stat-label">总分</div>
</div>
<div class="stat-item">
<div class="stat-value" id="correct-count">0</div>
<div class="stat-label">正确题数</div>
</div>
<div class="stat-item">
<div class="stat-value" id="incorrect-count">0</div>
<div class="stat-label">错误题数</div>
</div>
</div>
</div>
<div class="navigation-section" id="navigation-section">
<div id="navigation-message"></div>
<button type="button" class="next-btn" id="next-btn">继续</button>
</div>
</div>
<!-- 移除原有的<script>标签及内容替换为外部JS引用 -->
<script src="physics_quiz.js"></script>
</body>
</html>