Pesquisar neste blog

13/12/2022

Navbar com Bootstrap em HTML

<!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">
<meta http-equiv="refresh" content="7">
<title>Bootstrap - Slide</title>

<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi"
crossorigin="anonymous">

</head>
<body>

<nav class="navbar navbar-expand-lg navbar-dark"
    style="background-color: black;">
<div class="container-fluid">
<!-- Logo utulizado -->
<a class="navbar-brand" href="#">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRqaQ5-BH6gS0Y5uwNNK5NuVSFcPUT_GBajXA&usqp=CAU"
height="70">
</a>
<!-- Menu sanduíche-->
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
            data-bs-target="#Menu principal"
    aria-controls="navbarSupportedContent" aria-expanded="false"
            aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<!-- Menu principal -->
<div class="collapse navbar-collapse" id="menu-principal">

<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button"
                    data-bs-toggle="dropdown" aria-expanded="false">
Menu suspenso
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>

<!-- Barra de busca -->
</li>
<li class="nav-item">
<a class="nav-link disabled">Disabled</a>
</li>
</ul>
<form class="d-flex" role="search">
<input class="form-control me-2" type="search"
                placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success" type="submit">Go</button>
</form>
</div>
</div>
</nav>

<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3"
crossorigin="anonymous">
</script>

</body>
</html>















Referência:

Nenhum comentário: