Skip to content

Commit 35d9f09

Browse files
23h
1 parent 64d0553 commit 35d9f09

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<link rel="stylesheet" href="./style.css" />
88
<title>Jogo do Humor</title>
99
</head>
10-
<body>
10+
<body cz-shortcut-listen="true" style="background: url(./assets/img/bg.jpg) 0% 0% / cover no-repeat;">
1111
<header>
1212
<div class="header-container">
1313
<h1>Jogo do Humor do Naruto</h1>

js.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,41 @@
11
const elementoNome = document.getElementById("nome");
22
const elementoSituacao = document.querySelector("#situacao");
33
const elementoImg = document.querySelector("#imagem");
4-
54
let elementoBtn = document.querySelector("#alterar");
65

6+
77
elementoBtn.addEventListener("click", () => {
88
if (elementoBtn.value == "primeiro") {
99
elementoImg.src = "./assets/img/naruto1.png";
1010
elementoNome.innerText = "Naruto Uzumaki ";
1111
elementoSituacao.innerText = "Normal";
1212
document.body.style.background = "url('./assets/img/bg.jpg')";
13-
13+
document.body.style.backgroundRepeat = "no-repeat";
14+
document.body.style.backgroundSize = "cover";
1415
elementoBtn.value = "segundo";
1516
} else if (elementoBtn.value == "segundo") {
1617
elementoImg.src = "./assets/img/naruto2.png";
1718
elementoNome.innerText = "Naruto 1 cauda";
1819
elementoSituacao.innerText = "Descontrolado";
1920
document.body.style.background = "url('./assets/img/bg2.jpg')";
20-
21+
document.body.style.backgroundRepeat = "no-repeat";
22+
document.body.style.backgroundSize = "cover";
2123
elementoBtn.value = "terceiro";
2224
} else if (elementoBtn.value == "terceiro") {
2325
elementoImg.src = "./assets/img/naruto3.png";
2426
elementoNome.innerText = "Naruto 4 caudas";
2527
elementoSituacao.innerText = "Chama o Yamato";
2628
document.body.style.background = "url('./assets/img/bg3.jpg')";
29+
document.body.style.backgroundRepeat = "no-repeat";
30+
document.body.style.backgroundSize = "cover";
2731
elementoBtn.value = "quarto";
2832
} else {
2933
elementoImg.src = "./assets/img/naruto4.png";
3034
elementoNome.innerText = "Naruto 6 caudas";
3135
elementoSituacao.innerText = "É o fim do Pain";
3236
document.body.style.background = "url('./assets/img/bg4.jpg')";
37+
document.body.style.backgroundRepeat = "no-repeat";
38+
document.body.style.backgroundSize = "cover";
3339
elementoBtn.value = "primeiro";
3440
}
3541
});

style.css

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
padding: 0;
44
}
55
header {
6+
width: 100%;
67
background-image: linear-gradient(#f2c0a2, #d96b52, #d95043, #59211c);
78
padding: 2rem;
89
}
@@ -19,11 +20,11 @@ header h1 {
1920
margin: 0 auto;
2021
gap: 1rem;
2122
}
22-
body {
23+
/* body {
2324
background: url("./assets/img/bg.jpg");
2425
background-size: cover;
2526
background-repeat: no-repeat;
26-
}
27+
} */
2728

2829
section#infos {
2930
justify-content: center;
@@ -54,7 +55,7 @@ section#infos div#txt button {
5455
transition: all 0.5s ease-out;
5556
cursor: pointer;
5657
}
57-
audio{
58+
audio {
5859
padding: 3rem;
5960
}
6061

@@ -77,7 +78,7 @@ audio{
7778
.container-footer {
7879
display: flex;
7980
justify-items: center;
80-
justify-content: space-between;
81+
justify-content: space-around;
8182
max-width: 1080px;
8283
align-items: center;
8384
margin: 0 auto;
@@ -94,4 +95,3 @@ audio{
9495
min-width: 100%;
9596
}
9697
}
97-

0 commit comments

Comments
 (0)