----------
<nav>
<ul class="menu">
<li class="menu__item">
<a href="#home" class="menu__link">Home</a>
</li>
<li class="menu__item">
<a href="#services" class="menu__link">Services</a>
</li>
<li class="menu__item">
<a href="#about" class="menu__link">About</a>
</li>
<li class="menu__item">
<a href="#works" class="menu__link">Works</a>
</li>
<li class="menu__item">
<a href="#blog" class="menu__link">Blog</a>
</li>
<li class="menu__item">
<a href="#clients" class="menu__link">Clients</a>
</li>
<li class="menu__item">
<a href="#contact" class="menu__link">Contact</a>
</li>
</ul>
</nav>
-----------
.menu {
font-size: 0;
&__item {
display: inline-block;
vertical-align: middle;
font-size: 14px;
line-height: 1.9;
letter-spacing: 0.025em;
&:not(:first-child) {
margin-left: 30px;
}
}
&__link {
position: relative;
padding-bottom: 3px;
border-bottom: 2px solid transparent;
transition: all 0.2s ease-in-out;
&:before {
content: '';
display: block;
position: absolute;
top: -8px;
right: 0;
left: 0;
height: 3px;
opacity: 0;
background-color: $white-color;
transform: translateY(-8px);
transition: all 0.2s ease-in-out;
}
&:hover:before{
opacity: 1;
transform: translateY(0);
}
}
}
Ready nav menu for landing
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.