-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPreDifinedQuizes.html
80 lines (72 loc) · 1.65 KB
/
PreDifinedQuizes.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!DOCTYPE html>
<html>
<style>
@import url('https://fonts.googleapis.com/css2?family=Kanit&family=Poppins:wght@600&family=Ubuntu:wght@300&display=swap');
:root {
--kanit: 'Kanit', sans-serif;
--popins: 'Poppins', sans-serif;
--Ubantu: 'Ubuntu', sans-serif;
}
#quizWrap {
max-width: 600px;
margin: 0 auto;
/* RECOMMENDED FIXED HEIGHT IF YOU HAVE CONTENT BELOW THE QUIZ */
/* SO THAT PAGE LAYOUT DOES NOT "JUMP" */
/* height: 250px; */
}
/* (B) QUESTION */
body{
background: url('./TEmp/mountain.jpg');
background-size: cover;
background-repeat: no-repeat;
}
#quizQn {
font-family: var(--kanit);
margin-top: 200px;
padding: 20px;
background: #4c93ba;
color: #fff;
font-size: 24px;
border-radius: 10px;
}
/* (C) ANSWERS */
#quizAns {
font-family: var(--popins);
margin: 10px 0;
display: grid;
grid-template-columns: auto auto;
grid-gap: 10px;
}
#quizAns input[type=radio] { display: none; }
#quizAns label {
background: #fafafa;
border: 1px solid #eee;
border-radius: 10px;
padding: 10px;
font-size: 20px;
cursor: pointer;
text-align: center;
}
#quizAns label.correct {
background: #d8ffc4;
border: 1px solid #60a03f;
}
#quizAns label.wrong {
background: #ffe8e8;
border: 1px solid #c78181;
}
/* (D) BODY... DOES NOT QUITE MATTER */
</style>
<head>
<div class="div">
<title>Sample Javascript Quiz Demo</title>
<meta charset="utf-8">
<!-- (A) LOAD QUIZ CSS + JS -->
</div>
<script src="PreDifinedQuizes.js"></script>
</head>
<body>
<!-- (B) QUIZ CONTAINER -->
<div id="quizWrap"></div>
</body>
</html>