Vissza a webes elemekhez
Navigáció

Elegáns arany vonalmenü

Élő előnézet – a komponens teljes méretben.

Élő előnézet
HTML · CSS · JS
HTML
<nav class="menu-gold">
    <a href="#" class="active">Kezdőlap</a>
    <a href="#">Rólunk</a>
    <a href="#">Szolgáltatások</a>
    <a href="#">Portfólió</a>
    <a href="#">Kapcsolat</a>
</nav>
CSS
.menu-gold {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 38px;
    padding: 16px 24px;
    background: #11100d;
    border-bottom: 1px solid rgba(201, 170, 95, 0.22);
}

.menu-gold a {
    position: relative;
    padding: 9px 0;
    color: #a9a39a;
    text-decoration: none;
    font-family: "Georgia", serif;
    font-size: 14px;
    letter-spacing: 0.08em;
    transition: color 0.35s ease;
}

.menu-gold a::before,
.menu-gold a::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 0;
    height: 1px;
    background: #c9aa5f;
    transition: width 0.35s ease;
}

.menu-gold a::before {
    right: calc(100% + 8px);
}

.menu-gold a::after {
    left: calc(100% + 8px);
}

.menu-gold a:hover,
.menu-gold a.active {
    color: #f1d58c;
}

.menu-gold a:hover::before,
.menu-gold a:hover::after,
.menu-gold a.active::before,
.menu-gold a.active::after {
    width: 16px;
}

@media (max-width: 700px) {
    .menu-gold {
        gap: 22px;
        flex-wrap: wrap;
    }
}
JavaScript
Ehhez az elemhez nincs külön JavaScript.