-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
106 lines (106 loc) · 3.64 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html>
<html lang="en">
<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>Css</title>
<link rel="stylesheet" href="styles/style.css" />
<link rel="icon" type="image/x-icon" href="assets/favicon.ico">
</head>
<body>
<div>
<header>
<section class="titulo">
<nav class="menu-nav contenedor">
<div class="logo">
<h1>Knameless</h1>
</div>
<div class="links">
<li><a href="#laptop">Laptop</a></li>
<li><a href="#tarjeta">Tarjeta</a></li>
</div>
</nav>
</section>
</header>
<section class="hero">
<div class="color-back">
<div class="text-cont contenedor">
<h1>Titulo promedio</h1>
<p>
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Placeat,
maxime. Consequatur, laborum fugit nam a esse modi nemo culpa
totam ea optio sed accusamus, voluptates eum in quasi molestiae.
Soluta!
</p>
<a href="#laptop">Ver mas</a>
</div>
</div>
</section>
<section class="lap" id="laptop">
<div class="par-text">
<h1>Laptop</h1>
<div class="division"></div>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid, et
est necessitatibus illo quas, ipsa aspernatur reiciendis eligendi
nam voluptatem similique. Voluptas dolor accusantium officiis atque
corrupti est velit ad.
</p>
</div>
<div>
<img id="reload" src="assets/msi1.png" alt="" />
</div>
</section>
<section class="tarjeta" id="tarjeta">
<div class="container">
<div class="card">
<h1 class="title">Tarjeta Fisa</h1>
<img src="assets/chip.png" alt="" class="chip" />
<h2 class="numbers">1234 1234 1234 1234</h2>
<h3 class="name-user">A. Gonzalez</h3>
<p class="valid">VALIDO HASTA</p>
<h4 class="date">12/24</h4>
</div>
</div>
<div class="par-text">
<h1>Tarjeta</h1>
<div class="division"></div>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid, et
est necessitatibus illo quas, ipsa aspernatur reiciendis eligendi
nam voluptatem similique. Voluptas dolor accusantium officiis atque
corrupti est velit ad.
</p>
</div>
</section>
<div class="sticky-button">
<a href="#">
<img class="btn-top" src="assets/arrow.png" alt="" width="30px" />
</a>
</div>
</div>
<script>
// Portatil
window.onscroll = function (e) {
if (window.pageYOffset > 600) {
document.getElementById("reload").src = "assets/msi2.png";
}
if (window.pageYOffset > 730) {
document.getElementById("reload").src = "assets/msi3.png";
}
if (window.pageYOffset <= 600) {
document.getElementById("reload").src = "assets/msi1.png";
}
};
// Tarjeta
const root = document.querySelector(":root");
document.addEventListener("mousemove", (e) => {
const mouseX = 2 * (e.clientX / window.innerWidth) - 1;
const mouseY = 2 * (e.clientY / window.innerHeight) - 1;
root.style.setProperty("--mouse-x", mouseX);
root.style.setProperty("--mouse-y", -mouseY);
});
</script>
</body>
</html>