Premium Navbar HTML

7 views 408 lines
HTML • 408 lines
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>Premium Navbar</title>

<style>

:root{
    --primary:#6366f1;
    --secondary:#8b5cf6;
    --accent:#06b6d4;
    --dark:#0f172a;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Inter,sans-serif;
}

body{
    min-height:100vh;
    background:
    linear-gradient(
        135deg,
        #020617,
        #172554,
        #312e81
    );
}

/* Navbar */

.navbar{

    position:sticky;
    top:15px;

    width:min(1400px,95%);
    margin:auto;
    margin-top:15px;

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

    padding:15px 25px;

    border-radius:20px;

    backdrop-filter:blur(20px);

    background:
    rgba(255,255,255,.08);

    border:1px solid rgba(255,255,255,.1);

    box-shadow:
    0 10px 30px rgba(0,0,0,.2);

    z-index:999;
}

/* Logo */

.logo{

    display:flex;
    align-items:center;
    gap:12px;

    color:white;
    font-size:22px;
    font-weight:700;
}

.logo-icon{

    width:45px;
    height:45px;

    border-radius:14px;

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

    background:
    linear-gradient(
        135deg,
        var(--primary),
        var(--accent)
    );

    box-shadow:
    0 10px 25px rgba(99,102,241,.3);
}

/* Navigation */

.nav-links{

    display:flex;
    align-items:center;
    gap:30px;
}

.nav-links a{

    position:relative;

    text-decoration:none;

    color:#e2e8f0;

    font-weight:500;

    transition:.3s;
}

.nav-links a:hover{
    color:white;
}

.nav-links a::after{

    content:"";

    position:absolute;

    left:0;
    bottom:-8px;

    width:0;
    height:3px;

    border-radius:20px;

    background:
    linear-gradient(
        90deg,
        var(--primary),
        var(--accent)
    );

    transition:.4s;
}

.nav-links a:hover::after{
    width:100%;
}

/* Right Side */

.right{

    display:flex;
    align-items:center;
    gap:15px;
}

/* Notification */

.notify{

    position:relative;

    width:42px;
    height:42px;

    border-radius:12px;

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

    background:
    rgba(255,255,255,.08);

    color:white;

    cursor:pointer;
}

.badge{

    position:absolute;

    top:-4px;
    right:-4px;

    width:18px;
    height:18px;

    border-radius:50%;

    background:#ef4444;

    color:white;

    font-size:10px;

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

/* CTA */

.cta{

    padding:12px 22px;

    border:none;

    border-radius:12px;

    color:white;

    cursor:pointer;

    background:
    linear-gradient(
        135deg,
        var(--primary),
        var(--accent)
    );

    transition:.3s;
}

.cta:hover{

    transform:translateY(-3px);

    box-shadow:
    0 10px 25px rgba(99,102,241,.4);
}

/* Avatar */

.avatar{

    width:42px;
    height:42px;

    border-radius:50%;

    background:
    linear-gradient(
        135deg,
        #8b5cf6,
        #06b6d4
    );

    color:white;

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

    font-weight:700;

    cursor:pointer;
}

/* Mobile Menu */

#menu{
    display:none;
}

.hamburger{

    display:none;

    color:white;

    font-size:28px;

    cursor:pointer;
}

@media(max-width:900px){

.nav-links{

    position:absolute;

    top:90px;
    left:0;

    width:100%;

    flex-direction:column;

    gap:20px;

    padding:30px;

    border-radius:20px;

    background:
    rgba(15,23,42,.95);

    backdrop-filter:blur(20px);

    transform:scaleY(0);

    transform-origin:top;

    transition:.4s;
}

#menu:checked ~ .nav-links{
    transform:scaleY(1);
}

.hamburger{
    display:block;
}

.nav-links a{
    font-size:18px;
}

.right .cta,
.right .notify,
.right .avatar{
    display:none;
}

}

.hero{

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

    min-height:80vh;

    color:white;

    font-size:3rem;
    font-weight:700;
}

</style>
</head>
<body>

<nav class="navbar">

    <div class="logo">

        <div class="logo-icon">
            A
        </div>

        AbiDev
    </div>

    <input type="checkbox" id="menu">

    <label for="menu" class="hamburger">
        ☰
    </label>

    <div class="nav-links">

        <a href="#">Home</a>
        <a href="#">Features</a>
        <a href="#">Pricing</a>
        <a href="#">Templates</a>
        <a href="#">Contact</a>

    </div>

    <div class="right">

        <div class="notify">
            🔔
            <span class="badge">3</span>
        </div>

        <button class="cta">
            Get Started
        </button>

        <div class="avatar">
            A
        </div>

    </div>

</nav>

<section class="hero">
    Premium SaaS Navbar
</section>

</body>
</html>
Live Preview HTML preview
Raw Code • 408 lines
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>Premium Navbar</title>

<style>

:root{
    --primary:#6366f1;
    --secondary:#8b5cf6;
    --accent:#06b6d4;
    --dark:#0f172a;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Inter,sans-serif;
}

body{
    min-height:100vh;
    background:
    linear-gradient(
        135deg,
        #020617,
        #172554,
        #312e81
    );
}

/* Navbar */

.navbar{

    position:sticky;
    top:15px;

    width:min(1400px,95%);
    margin:auto;
    margin-top:15px;

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

    padding:15px 25px;

    border-radius:20px;

    backdrop-filter:blur(20px);

    background:
    rgba(255,255,255,.08);

    border:1px solid rgba(255,255,255,.1);

    box-shadow:
    0 10px 30px rgba(0,0,0,.2);

    z-index:999;
}

/* Logo */

.logo{

    display:flex;
    align-items:center;
    gap:12px;

    color:white;
    font-size:22px;
    font-weight:700;
}

.logo-icon{

    width:45px;
    height:45px;

    border-radius:14px;

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

    background:
    linear-gradient(
        135deg,
        var(--primary),
        var(--accent)
    );

    box-shadow:
    0 10px 25px rgba(99,102,241,.3);
}

/* Navigation */

.nav-links{

    display:flex;
    align-items:center;
    gap:30px;
}

.nav-links a{

    position:relative;

    text-decoration:none;

    color:#e2e8f0;

    font-weight:500;

    transition:.3s;
}

.nav-links a:hover{
    color:white;
}

.nav-links a::after{

    content:"";

    position:absolute;

    left:0;
    bottom:-8px;

    width:0;
    height:3px;

    border-radius:20px;

    background:
    linear-gradient(
        90deg,
        var(--primary),
        var(--accent)
    );

    transition:.4s;
}

.nav-links a:hover::after{
    width:100%;
}

/* Right Side */

.right{

    display:flex;
    align-items:center;
    gap:15px;
}

/* Notification */

.notify{

    position:relative;

    width:42px;
    height:42px;

    border-radius:12px;

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

    background:
    rgba(255,255,255,.08);

    color:white;

    cursor:pointer;
}

.badge{

    position:absolute;

    top:-4px;
    right:-4px;

    width:18px;
    height:18px;

    border-radius:50%;

    background:#ef4444;

    color:white;

    font-size:10px;

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

/* CTA */

.cta{

    padding:12px 22px;

    border:none;

    border-radius:12px;

    color:white;

    cursor:pointer;

    background:
    linear-gradient(
        135deg,
        var(--primary),
        var(--accent)
    );

    transition:.3s;
}

.cta:hover{

    transform:translateY(-3px);

    box-shadow:
    0 10px 25px rgba(99,102,241,.4);
}

/* Avatar */

.avatar{

    width:42px;
    height:42px;

    border-radius:50%;

    background:
    linear-gradient(
        135deg,
        #8b5cf6,
        #06b6d4
    );

    color:white;

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

    font-weight:700;

    cursor:pointer;
}

/* Mobile Menu */

#menu{
    display:none;
}

.hamburger{

    display:none;

    color:white;

    font-size:28px;

    cursor:pointer;
}

@media(max-width:900px){

.nav-links{

    position:absolute;

    top:90px;
    left:0;

    width:100%;

    flex-direction:column;

    gap:20px;

    padding:30px;

    border-radius:20px;

    background:
    rgba(15,23,42,.95);

    backdrop-filter:blur(20px);

    transform:scaleY(0);

    transform-origin:top;

    transition:.4s;
}

#menu:checked ~ .nav-links{
    transform:scaleY(1);
}

.hamburger{
    display:block;
}

.nav-links a{
    font-size:18px;
}

.right .cta,
.right .notify,
.right .avatar{
    display:none;
}

}

.hero{

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

    min-height:80vh;

    color:white;

    font-size:3rem;
    font-weight:700;
}

</style>
</head>
<body>

<nav class="navbar">

    <div class="logo">

        <div class="logo-icon">
            A
        </div>

        AbiDev
    </div>

    <input type="checkbox" id="menu">

    <label for="menu" class="hamburger">
        ☰
    </label>

    <div class="nav-links">

        <a href="#">Home</a>
        <a href="#">Features</a>
        <a href="#">Pricing</a>
        <a href="#">Templates</a>
        <a href="#">Contact</a>

    </div>

    <div class="right">

        <div class="notify">
            🔔
            <span class="badge">3</span>
        </div>

        <button class="cta">
            Get Started
        </button>

        <div class="avatar">
            A
        </div>

    </div>

</nav>

<section class="hero">
    Premium SaaS Navbar
</section>

</body>
</html>
Code copied to clipboard!