bootstrap实现大气自适应后台管理系统仪表盘代码
代码语言:html
所属分类:布局界面
代码描述:bootstrap实现大气自适应后台管理系统仪表盘代码
代码标签: bootstrap 大气 自适应 后台 管理 系统 仪表盘 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>数据中心 (ECharts)</title> <!-- Bootstrap CSS CDN --> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/bootstrap.5.3.0.css"> <!-- Bootstrap Icons CDN --> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/bootstrap-icons.1.11.3.css"> <style> body { background-color: #f8f9fa; /* Light grey background */ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /* Common system font stack */ } .sidebar { background-color: #fff; height: 100vh; position: sticky; top: 0; border-right: 1px solid #dee2e6; overflow-y: auto; /* Add scroll if content overflows */ z-index: 1020; /* Ensure sidebar is below topbar if both are sticky */ } .sidebar .nav-link { color: #333; padding: 0.75rem 1.25rem; /* Increased padding slightly */ font-size: 0.9rem; /* Slightly smaller font */ display: flex; /* Align icon and text */ align-items: center; } .sidebar .nav-link.active { background-color: #e7f3ff; /* Lighter blue background for active */ color: #0d6efd; border-radius: 0.375rem; /* Standard Bootstrap radius */ font-weight: 500; /* Slightly bolder active link */ } .sidebar .nav-link:hover { background-color: #f1f3f5; /* Subtle hover effect */ color: #0d6efd; } .sidebar .nav-link .bi { margin-right: 0.75rem; width: 1.1em; /* Align icons better */ font-size: 1.1em; /* Slightly larger icons */ min-width: 1.1em; /* Ensure consistent icon spacing */ text-align: center; } .sidebar .nav-header { font-size: 0.75rem; /* Smaller header */ color: #6c757d; padding: 0.5rem 1.25rem; margin-top: 1rem; font-weight: 600; /* Bolder header */ text-transform: uppercase; /* Uppercase header */ } .sidebar .sub-menu .nav-link { padding-left: calc(1.25rem + 1.1em + 0.75rem); /* Indent sub-menu items based on icon + margin */ font-size: 0.85rem; padding-top: 0.4rem; padding-bottom: 0.4rem; } /* Team styling */ .sidebar .list-group-item { background-color: transparent; border: none; padding-left: 1.25rem; padding-right: 1.25rem; } .sidebar .team-avatars img { margin-right: -8px; /* Overlap avatars slightly */ border: 2px solid #fff; /* White border around avatars */ } /* Main content padding when sidebar is visible */ @media (min-width: 768px) { main { padding-left: calc(var(--bs-gutter-x) * .5); /* Adjust if sidebar width changes */ } } /* Top Navbar */ .top-navbar { background-color: #fff; box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); z-index: 1030; /* Ensure topbar is above sidebar */ } .top-navbar .form-control { border: none; /* Remove border from search */ background-color: #f8f9fa; /* Light background for search */ } .top-navbar .input-group-text { border: none; background-color: #f8f9fa; } .top-navbar .nav-link .bi-bell { color: #6c757d; /* Grey bell icon */ } .card { border: none; box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); border-radius: 0.5rem; /* Slightly more rounded cards */ } .stat-card .card-body { position: relative; overflow: hidden; color: white; border-radius: 0.5rem; /* Match card radius */ } /* Stat card colors */ .card-purple { background: linear-gradient(135deg, #a88beb 0%, #f8ceec 100%); } .card-orange { background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%); } .card-pink { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); } .card-teal { background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%); } .stat-card h5 { font-size: 0.9rem; /* Slightly smaller title */ font-weight: 500; margin-bottom: 0.25rem; opacity: 0.9; } .stat-card .display-6 { font-size: 1.75rem; font-weight: 600; /* Bolder number */ margin-bottom: 0.25rem; } .stat-card .stat-subtext { color: rgba(255, 255, 255, 0.8); font-size: 0.8rem; } .stat-card .stat-icon { position: absolute; bottom: -15px; /* Adjust position */ right: -15px; font-size: 4.5rem; /* Slightly larger icon */ opacity: 0.15; /* More subtle icon */ transform: rotate(-15deg); /* Slight rotation */ } /* Style for chart containers */ .chart-container { width: 100%; /* Ensure chart takes full width */ } .card-header { background-color: #fff; /* Ensure card headers are white */ border-bottom: 1px solid #dee2e6; /* Add border to header */ } .card-title { font-size: 1rem; /* Consistent card title size */ font-weight: 500; } </style> </head> <body> <div class="container-fluid"> <div class="row"> <!-- Sidebar --> <nav class="col-md-3 col-lg-2 d-md-block sidebar collapse" id="sidebarMenu"> <div class="position-sticky pt-3"> <h1 class="h4 p-3 mb-2 text-primary fw-bold"><i class="bi bi-bounding-box-circles me-2"></i>管理</h1> <!-- Team Section --> <div class="px-3 mb-3"> <h6 class="nav-header px-0"> <span>团队</span> </h6> <ul class="list-group list-group-flush"> <li class="list-group-item d-flex justify-content-between align-items-center ps-0 pe-1"> <div class="d-flex align-items-center"> <img src="//repo.bfw.wiki/bfwrepo/image/5d653be845a41.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_100,h_100,/quality,q_90" class="rounded-circle me-2" alt="Team Avatar" width="30" height="30"> <span class="small fw-medium">蓝田 团队</span> </div> <span class="badge bg-light text-dark rounded-pill">14</span> .........完整代码请登录后点击上方下载按钮下载查看
网友评论0