-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathe-navbar.html
More file actions
84 lines (77 loc) · 2.79 KB
/
e-navbar.html
File metadata and controls
84 lines (77 loc) · 2.79 KB
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
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Navbar!</title>
<link rel="stylesheet" href="./lib/bootstrap.min.css">
<style>
.navbar-nav .nav-link.active{
color: #fff;
}
.nav-link {
text-align: center;
}
section {
height: 100vh;
background-color: #ccc;
padding-top: 70px;
}
header {
position: sticky;
top: 0;
left: 0;
background-color: #fff;
}
</style>
</head>
<body>
<header id="cabecalho">
<div class="navbar navbar-expand-lg">
<div class="container">
<h1>Criando um menu</h1>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#menu">
<span class="navbar-toggler-icon">
</span>
</button>
<nav class="collapse navbar-collapse justify-content-end" id="menu">
<ul class="nav nav-pills navbar-nav"> <!-- o navbar-nav adiciona se quiser um menu vertical, para horizontal basta retirar essa classe-->
<li class="nav-item">
<a class="nav-link active" href="#inicio">Inicio</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#produtos">Produtos</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#promocoes">Promoções</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#contato">Contato</a>
</li>
<div>
<button type="button" class="btn btn-warning ">
<a style="text-decoration: none; color: #fff;" href="./index.html">Voltar ao Index</a>
</button>
</div>
</ul>
</nav>
</div>
</div>
</header>
<div data-bs-spy="scroll" data-bs-target="#cabecalho">
<section id="inicio">
<h2>Início</h2>
</section>
<section id="produtos">
<h2>Produtos</h2>
</section>
<section id="promocoes">
<h2>Promoções</h2>
</section>
<section id="contato">
<h2>Contato</h2>
</section>
</div>
<script src="./lib/bootstrap.bundle.min.js"></script>
</body>
</html>