Come fare per - Navigazione in basso
Scopri come creare un menu di navigazione in basso con CSS.
Menu di navigazione in basso
Crea un menu di navigazione in basso
Passaggio 1) Aggiungi HTML:
Esempio
<div class="navbar">
<a href="#home"
class="active">Home</a>
<a href="#news">News</a>
<a href="#contact">Contact</a>
</div>
Passaggio 2) Aggiungi CSS:
Esempio
/* Place the navbar at the bottom of the page, and make it stick */
.navbar {
background-color: #333;
overflow: hidden;
position: fixed;
bottom: 0;
width:
100%;
}
/*
Style the links inside the navigation bar */
.navbar a {
float: left;
display: block;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
/* Change the color of links on hover */
.navbar a:hover {
background-color: #ddd;
color: black;
}
/* Add
a color to the active/current link */
.navbar
a.active {
background-color: #04AA6D;
color: white;
}
Suggerimento: per creare una barra di navigazione in basso adatta ai dispositivi mobili, leggi il nostro tutorial Come fare per - Navigazione in basso reattiva.
Suggerimento: vai al nostro tutorial CSS Navbar per saperne di più sulle barre di navigazione.