-
Notifications
You must be signed in to change notification settings - Fork 0
/
nav.html
41 lines (38 loc) · 1.11 KB
/
nav.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
<!DOCTYPE html>
<html lang="es-CL" >
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Blob UI - HTML5 Basico</title>
<link href="https://fonts.googleapis.com/css?family=Playfair+Display:400,700|Roboto:400,300,500,700,900" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/blob.css">
<style>
body{
background: var(--cream-pale);
}
nav{
}
</style>
</head>
<body>
<div class="css-grid">
<input type="checkbox" id="toggle">
<nav>
<a class="logo" href="#">Logo</a>
<label class="navbar-toggle" for="toggle">☰</label>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Sobre</a></li>
<li><a href="#">Blog</a></li>
</ul>
</nav>
</div>
<script type="text/javascript">
let mainNav = document.querySelector('.navbar-toggle');
let navBarToggle = document.querySelector('nav');
mainNav.addEventListener('click', e => {
navBarToggle.classList.toggle('ico-movil');
});
</script>
</body>
</html>