div+css实现黑色酷炫导航菜单效果代码

代码语言:html

所属分类:菜单导航

代码描述:div+css实现黑色酷炫导航菜单效果代码

代码标签: div css 黑色 酷炫 导航 菜单

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Sidebar with Neon Selected State</title>
<style>
  :root{
    --bg: #0c0f13;
    --panel: #0e1318;
    --panel-2: #0b0f14;
    --line: #1a222b;
    --text: #cfd6dd;
    --muted: #748090;
    --accent: #b6ff3b;          /* 绿色主色 */
    --accent-2: #70ff1a;        /* 渐变次色 */
    --radius: 14px;
  }

  html,body{height:100%}
  body{
    margin:0;
    font:14px/1.4 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
    color:var(--text);
    background: radial-gradient(1200px 600px at 20% -10%, #1a212b33, transparent 60%) , var(--bg);
  }

  .app{
    height:100%;
    display:grid;
    grid-template-columns: 300px 1fr;
    gap:0;
  }

  /* 左侧侧边栏 */
  .sidebar{
    position:relative;
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border-right:1px solid var(--line);
    padding:14px 14px 16px;
    overflow:visible; /* 让选中项的“霓虹条”可以超出可见 */
  }

  .brand{
    display:flex; align-items:center; gap:10px;
    padding:10px 12px;
    border-radius:12px;
    background: linear-gradient(180deg, #12171d, #0f1318);
    border:1px solid #ffffff14;
    box-shadow: inset 0 1px 0 #ffffff06, 0 4px 18px rgba(0,0,0,.35);
  }
  .logo{
    width:24px;height:24px;border-radius:7px;
    display:grid;place-items:center;
    background:linear-gradient(145deg,#191f26,#0f1419);
    border:1px solid #ffffff22;
  }
  .logo::after{
    content:"";width:8px;height:8px;border-radius:3px;background:#fff2;
  }
  .brand-name{font-weight:600;color:.........完整代码请登录后点击上方下载按钮下载查看

网友评论0