-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
62 lines (60 loc) · 1.74 KB
/
index.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
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pedido</title>
</head>
<body style="background-color: red;">
<div
id="element"
style="
width: 100vw;
height: 100vh;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
"
>
<div style="width: 300px; height: 300px; text-align: center">
<h3 style="font-weight: bold; color: white;">Assistir o jogo do leão amanhã ?</h3>
<button
style="
margin-right: 10px;
padding: 10px;
width: 100px;
cursor: pointer;
background-color: white;
border-radius: 10px;
border: none;
"
id="btn-yes"
onclick="openYoutube()"
>
Sim
</button>
<button
style="padding: 10px; width: 100px; cursor: pointer; background-color: white; border-radius: 10px; border: none;"
id="btn-no"
>
Não
</button>
</div>
</div>
<script>
const element = document.getElementById("btn-no");
element.addEventListener("mouseenter", () => {
const x = Math.floor(Math.random() * window.innerWidth);
const y = Math.floor(Math.random() * window.innerHeight);
element.style.position = "absolute";
element.style.left = x + "px";
element.style.top = y + "px";
});
function openYoutube() {
window.open("https://www.youtube.com/watch?v=hb2ZB7uOGz4");
}
</script>
</body>
</html>