Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes the background image #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 31 additions & 24 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,29 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="style.css" rel="stylesheet">
<script defer src="script.js"></script>
<title>Quiz App</title>
</head>
<body>
<div class="container">
<div id="question-container" class="hide">
<div id="question">Question</div>
<div id="answer-buttons" class="btn-grid">
<button class="btn">Answer 1</button>
<button class="btn">Answer 2</button>
<button class="btn">Answer 3</button>
<button class="btn">Answer 4</button>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link href="style.css" rel="stylesheet" />
<script defer src="script.js"></script>
<title>Quiz App</title>
</head>
<body
style="
background-image: url('https://th.bing.com/th/id/OIG.mHqbEA40RV648KeC5bEr?pid=ImgGn');

"
>
<div class="container">
<div id="question-container" class="hide">
<div id="question">Question</div>
<div id="answer-buttons" class="btn-grid">
<button class="btn">Answer 1</button>
<button class="btn">Answer 2</button>
<button class="btn">Answer 3</button>
<button class="btn">Answer 4</button>
</div>
</div>
<div class="controls">
<button id="start-btn" class="start-btn btn">
Let's Start the Quiz
</button>
<!-- change "NEXT" to "Proceed" by bhaskar -->
<button id="next-btn" class="next-btn btn hide">Proceed</button>
</div>
</div>
<div class="controls">
<button id="start-btn" class="start-btn btn">Start</button>
<!-- change "NEXT" to "Proceed" by bhaskar -->
<button id="next-btn" class="next-btn btn hide">Proceed</button>
</div>
</div>
</body>
</body>
</html>
186 changes: 96 additions & 90 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,90 +1,96 @@
*, *::before, *::after {
box-sizing: border-box;
font-family: Gotham Rounded;
}

:root {
--hue-neutral: 200;
--hue-wrong: 0;
--hue-correct: 145;
}

body {
--hue: var(--hue-neutral);
padding: 0;
margin: 0;
display: flex;
width: 100vw;
height: 100vh;
justify-content: center;
align-items: center;
background-color: hsl(var(--hue), 100%, 20%);
}

body.correct {
--hue: var(--hue-correct);
}

body.wrong {
--hue: var(--hue-wrong);
}

.container {
width: 800px;
max-width: 80%;
background-color: white;
border-radius: 5px;
padding: 10px;
box-shadow: 0 0 10px 2px;
}

.btn-grid {
display: grid;
grid-template-columns: repeat(2, auto);
gap: 10px;
margin: 20px 0;
}

.btn {
--hue: var(--hue-neutral);
border: 1px solid hsl(var(--hue), 100%, 30%);
background-color: hsl(var(--hue), 100%, 50%);
border-radius: 5px;
padding: 5px 10px;
color: white;
outline: none;
}

.btn:hover {
border-color: black;
}

.btn.correct {
--hue: var(--hue-correct);
color: black;
}

.btn.wrong {
--hue: var(--hue-wrong);
}

.start-btn, .next-btn {
font-size: 1.5rem;
font-weight: bold;
padding: 10px 20px;
}

.controls {
display: flex;
justify-content: center;
align-items: center;
}

.hide {
display: none;
}
/* change font size of questions and style=italic by Sweety*/
#question{
font-size: large;
font-style: italic;
}
*,
*::before,
*::after {
box-sizing: border-box;
font-family: Gotham Rounded;
}

:root {
--hue-neutral: 200;
--hue-wrong: 0;
--hue-correct: 145;
}

body {
--hue: var(--hue-neutral);
padding: 0;
margin: 0;
display: flex;
width: 100vw;
height: 100vh;
justify-content: center;
align-items: center;
background-color: hsl(var(--hue), 100%, 20%);
background-repeat: no-repeat;
background-size: 100vw 100vh;
object-fit:contain;
}

body.correct {
--hue: var(--hue-correct);
}

body.wrong {
--hue: var(--hue-wrong);
}

.container {
width: 800px;
max-width: 80%;
background-color: white;
border-radius: 5px;
padding: 10px;
box-shadow: 0 0 10px 2px;
}

.btn-grid {
display: grid;
grid-template-columns: repeat(2, auto);
gap: 10px;
margin: 20px 0;
}

.btn {
--hue: var(--hue-neutral);
border: 1px solid hsl(var(--hue), 100%, 30%);
background-color: hsl(var(--hue), 100%, 50%);
border-radius: 5px;
padding: 5px 10px;
color: white;
outline: none;
}

.btn:hover {
border-color: black;
}

.btn.correct {
--hue: var(--hue-correct);
color: black;
}

.btn.wrong {
--hue: var(--hue-wrong);
}

.start-btn,
.next-btn {
font-size: 1.5rem;
font-weight: bold;
padding: 10px 20px;
}

.controls {
display: flex;
justify-content: center;
align-items: center;
}

.hide {
display: none;
}
/* change font size of questions and style=italic by Sweety*/
#question {
font-size: large;
font-style: italic;
}