-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
68 lines (66 loc) · 2.1 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
63
64
65
66
67
68
<!DOCTYPE html>
<html lang="es">
<head>
<link rel="icon" href="assets/favicon.svg" type="image/x-icon">
<link rel="shortcut icon" href="assets/favicon.svg" type="image/x-icon">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pa ti <3 cosita</title>
<style>
body {
background-image: url('assets/backimage.jpg');
background-size: cover;
background-position: center;
font-family: Arian, sans-serif;
}
.box {
background: rgba(255, 255, 255, 0.8); /* Fondo blanco semi-transparente */
border-radius: 10px;
padding: 20px;
text-align: center;
width: 80%;
margin: 100px auto; /* Centrar verticalmente */
}
h1 {
color: red;
margin: 0 0 20px 0;
}
button {
display: block;
margin: 10px auto;
padding: 10px 20px;
font-size: 25px;
cursor: pointer;
}
.button-container {
position: relative;
text-align: center;
height: 200px;
}
#button-no {
position: absolute;
}
</style>
<script>
function moveButton() {
var button = document.getElementById('button-no');
var container = document.querySelector('.button-container');
var x = Math.random() * (container.clientWidth - button.clientWidth);
var y = Math.random() * (container.clientHeight - button.clientHeight);
button.style.left = x + 'px';
button.style.top = y + 'px';
}
// Llamar a la función moveButton cada 500 milisegundos
setInterval(moveButton, 20);
</script>
</head>
<body>
<div class="box">
<h1>¿QUIERES SER MI NOVIA?</h1>
<div class="button-container">
<button onclick="window.location.href='respuesta.html'">SÍ ;)</button>
<button id="button-no">no °_°</button>
</div>
</div>
</body>
</html>