Vissza a webes elemekhez
Navigáció

Íves neon menü

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

Élő előnézet
HTML · CSS · JS
HTML
<nav class="arc-menu">

    <div class="arc-center">
        <span>WE</span>
    </div>

    <a href="#" class="arc-item arc-1">
        <i class="bi bi-house-door-fill"></i>
        <span>Kezdőlap</span>
    </a>

    <a href="#" class="arc-item arc-2">
        <i class="bi bi-person-fill"></i>
        <span>Rólunk</span>
    </a>

    <a href="#" class="arc-item arc-3">
        <i class="bi bi-grid-fill"></i>
        <span>Munkák</span>
    </a>

    <a href="#" class="arc-item arc-4">
        <i class="bi bi-images"></i>
        <span>Galéria</span>
    </a>

    <a href="#" class="arc-item arc-5">
        <i class="bi bi-envelope-fill"></i>
        <span>Kapcsolat</span>
    </a>

</nav>
CSS
.arc-menu {
    position: relative;

    width: 560px;
    height: 250px;

    margin: 0 auto;

    border-bottom: 1px solid rgba(46, 204, 113, 0.18);
}

.arc-menu::before {
    content: "";

    position: absolute;
    left: 50%;
    bottom: -125px;

    width: 500px;
    height: 500px;

    border: 1px solid rgba(46, 204, 113, 0.09);
    border-radius: 50%;

    transform: translateX(-50%);
}

.arc-center {
    position: absolute;
    left: 50%;
    bottom: 28px;

    width: 70px;
    height: 70px;

    display: flex;
    align-items: center;
    justify-content: center;

    transform: translateX(-50%);

    border: 1px solid rgba(46, 204, 113, 0.5);
    border-radius: 50%;

    background: #0b1511;

    color: #2ecc71;

    font-family: serif;
    font-size: 18px;
    letter-spacing: 2px;

    box-shadow:
        0 0 24px rgba(46, 204, 113, 0.15),
        inset 0 0 20px rgba(46, 204, 113, 0.05);

    z-index: 5;
}

.arc-center::before {
    content: "";

    position: absolute;
    inset: -8px;

    border: 1px solid rgba(46, 204, 113, 0.08);
    border-radius: 50%;
}

.arc-item {
    position: absolute;

    bottom: 35px;

    width: 70px;
    height: 70px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    color: #687483;

    text-decoration: none;

    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;

    background: #0b1118;

    transition:
        color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;
}

.arc-item i {
    font-size: 17px;
}

.arc-item span {
    font-size: 9px;
    letter-spacing: 0.3px;
}

.arc-item:hover {
    color: #ffffff;

    border-color: rgba(46, 204, 113, 0.7);

    box-shadow:
        0 0 20px rgba(46, 204, 113, 0.2),
        inset 0 0 15px rgba(46, 204, 113, 0.05);
}

.arc-item:hover i {
    color: #2ecc71;
}

.arc-1 {
    left: 25px;
}

.arc-2 {
    left: 120px;
    bottom: 105px;
}

.arc-3 {
    left: 245px;
    bottom: 145px;
}

.arc-4 {
    right: 120px;
    bottom: 105px;
}

.arc-5 {
    right: 25px;
}

@media (max-width: 620px) {
    .arc-menu {
        width: 100%;
        transform: scale(0.8);
        transform-origin: top center;
    }
}
JavaScript
document.querySelectorAll(".arc-menu").forEach(menu => {

    const items = menu.querySelectorAll(".arc-item");

    items.forEach(item => {

        item.addEventListener("click", function () {

            items.forEach(link => {
                link.classList.remove("active");
            });

            this.classList.add("active");
        });

    });

});