← Retour galerie
Navbars · html-css · intermediate
Glass Orbit
Navbar glassmorph avec pastille qui glisse d’un lien à l’autre
Aperçu live
Code
:root {
--ink: #060708;
--panel: rgba(14, 16, 20, 0.72);
--acid: #b8ff2e;
--muted: rgba(255, 255, 255, 0.55);
--line: rgba(255, 255, 255, 0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
min-height: 100vh;
background:
radial-gradient(ellipse 70% 50% at 20% 0%, rgba(184, 255, 46, 0.1), transparent 50%),
radial-gradient(ellipse 50% 40% at 90% 20%, rgba(80, 120, 255, 0.12), transparent 45%),
var(--ink);
font-family: "Segoe UI", system-ui, sans-serif;
color: #fff;
padding: 1.5rem;
}
.nav {
max-width: 1100px;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.7rem 0.85rem 0.7rem 1.25rem;
border-radius: 999px;
background: var(--panel);
border: 1px solid var(--line);
backdrop-filter: blur(18px) saturate(1.4);
-webkit-backdrop-filter: blur(18px) saturate(1.4);
box-shadow:
0 20px 50px rgba(0, 0, 0, 0.45),
inset 0 1px 0 rgba(255, 255, 255, 0.06);
position: sticky;
top: 1.5rem;
z-index: 50;
}
.brand {
display: flex;
align-items: center;
gap: 0.55rem;
text-decoration: none;
color: #fff;
font-weight: 800;
letter-spacing: -0.02em;
font-size: 1.05rem;
}
.brand-mark {
width: 28px;
height: 28px;
border-radius: 9px;
background: linear-gradient(135deg, var(--acid), #6fd10a);
box-shadow: 0 0 20px rgba(184, 255, 46, 0.45);
position: relative;
}
.brand-mark::after {
content: "";
position: absolute;
inset: 7px;
border-radius: 4px;
background: #06100a;
clip-path: polygon(20% 0, 100% 0, 80% 100%, 0 100%);
}
.links {
display: flex;
align-items: center;
gap: 0.15rem;
position: relative;
list-style: none;
}
.links a {
position: relative;
z-index: 1;
display: block;
padding: 0.55rem 1rem;
color: var(--muted);
text-decoration: none;
font-size: 0.9rem;
font-weight: 600;
border-radius: 999px;
transition: color 0.2s ease;
}
.links a:hover,
.links a.is-active {
color: #fff;
}
.pill {
position: absolute;
height: 100%;
top: 0;
left: 0;
width: 0;
border-radius: 999px;
background: rgba(184, 255, 46, 0.12);
border: 1px solid rgba(184, 255, 46, 0.25);
transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
pointer-events: none;
z-index: 0;
}
.cta {
display: inline-flex;
align-items: center;
gap: 0.4rem;
padding: 0.65rem 1.2rem;
border-radius: 999px;
border: none;
background: var(--acid);
color: #06100a;
font-weight: 800;
font-size: 0.88rem;
cursor: pointer;
text-decoration: none;
box-shadow: 0 0 28px rgba(184, 255, 46, 0.35);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cta:hover {
transform: translateY(-1px);
box-shadow: 0 0 40px rgba(184, 255, 46, 0.5);
}
.burger {
display: none;
width: 42px;
height: 42px;
border-radius: 50%;
border: 1px solid var(--line);
background: rgba(255, 255, 255, 0.04);
color: #fff;
cursor: pointer;
}
.hero-demo {
max-width: 1100px;
margin: 4rem auto 0;
padding: 3rem 1.5rem;
text-align: center;
}
.hero-demo h1 {
font-size: clamp(2rem, 5vw, 3.5rem);
font-weight: 900;
letter-spacing: -0.04em;
margin-bottom: 0.75rem;
}
.hero-demo p {
color: var(--muted);
max-width: 420px;
margin: 0 auto;
line-height: 1.6;
}
@media (max-width: 780px) {
.links { display: none; }
.burger { display: grid; place-items: center; }
.nav { border-radius: 22px; padding-right: 0.7rem; }
}
Envie de tweak les tokens ? Code Studio
