Каркас викторины: стартовый экран, стили, разметка трёх экранов
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
# Викторина
|
||||
|
||||
Небольшая браузерная викторина: 10 вопросов, четыре варианта ответа, счёт в конце.
|
||||
|
||||
Запуск: открыть `index.html` в браузере.
|
||||
|
||||
Проверка данных вопросов: `python check_questions.py`
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Викторина</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<h1>Викторина</h1>
|
||||
|
||||
<section id="screen-start">
|
||||
<p>Десять вопросов, четыре варианта ответа. Таймера нет — думайте спокойно.</p>
|
||||
<button id="btn-start">Начать</button>
|
||||
</section>
|
||||
|
||||
<section id="screen-quiz" class="hidden">
|
||||
<div id="progress"></div>
|
||||
<h2 id="q-text"></h2>
|
||||
<div id="q-options"></div>
|
||||
</section>
|
||||
|
||||
<section id="screen-result" class="hidden">
|
||||
<h2>Результат</h2>
|
||||
<p id="result-text"></p>
|
||||
<button id="btn-again">Пройти ещё раз</button>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script src="questions.js"></script>
|
||||
<script src="quiz.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,78 @@
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Segoe UI", Arial, sans-serif;
|
||||
background: #f4f5f7;
|
||||
color: #222;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.wrap {
|
||||
width: 100%;
|
||||
max-width: 560px;
|
||||
background: #fff;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
||||
padding: 32px;
|
||||
margin: 24px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 24px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 19px;
|
||||
margin-bottom: 16px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: 1.5;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
button {
|
||||
font-size: 16px;
|
||||
padding: 10px 22px;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
background: #2f6fed;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background: #2558c4;
|
||||
}
|
||||
|
||||
#progress {
|
||||
font-size: 13px;
|
||||
color: #888;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
#q-options button {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
margin-bottom: 10px;
|
||||
background: #eef1f6;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
#q-options button:hover {
|
||||
background: #dce3ef;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
Reference in New Issue
Block a user