I want to know how to decrease the size of the menu when there is scrolling.
This is my menu:
header {
position: fixed;
width: 100%;
box-shadow: 0 4px 20px -4px #ababab;
background: rgba(249, 249, 249, .8);
transition: background .8s ease;
z-index: 10;
}
header:hover {
background: rgb(249, 249, 249);
}
.logo {
width: 150px;
}
.main-menu {
position: fixed;
top: -9px;
left: 11%;
z-index: 10;
}
.menu {
display: inline-block;
padding-right: 25px;
position: relative;
left: 28%;
}
.link-menu {
text-decoration: none;
font-family: 'Crete Round', Helvetica;
font-size: 180%;
color: #000;
border-bottom: 2px solid rgba(0, 0, 0, 0);
border-radius: 30%;
transition: border-radius .3s, color .3s;
padding: 0 0 10px 0;
line-height: 3em ;
}
.link-menu:hover {
border-bottom: 2px solid #000;
border-radius: 10%;
color: #275d6e;
}
<header>
<nav role="navegation">
<ul>
<li class="menu"><a href="index.html" class="link-menu">Home</a></li>
<li class="menu"><a href="#" class="link-menu">Sobre Nós</a></li>
<li class="menu"><a href="#" class="link-menu">Petsitter</a></li>
<li class="menu"><a href="#" class="link-menu">Dog Walker</a></li>
<li class="menu"><a href="#" class="link-menu">Contato</a></li>
</ul>
</nav>
</header>