css+div布局实现网盘仪表盘后台代码
代码语言:html
所属分类:布局界面
代码描述:css+div布局实现网盘仪表盘后台代码
下面为部分代码预览,完整代码请点击下载或在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>云存储 Dashboard</title>
<style>
/* 全局样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}
body {
background-color: #f5f7fa;
color: #333;
}
.container {
display: flex;
min-height: 100vh;
}
/* 侧边栏样式 */
.sidebar {
width: 250px;
background-color: #2c3e50;
color: white;
padding: 20px;
display: flex;
flex-direction: column;
}
.logo {
display: flex;
align-items: center;
margin-bottom: 30px;
font-size: 1.5rem;
font-weight: bold;
}
.logo i {
margin-right: 10px;
color: #3498db;
}
.nav-menu ul {
list-style: none;
}
.nav-menu li {
margin-bottom: 15px;
padding: 10px;
border-radius: 5px;
transition: background-color 0.3s;
}
.nav-menu li:hover, .nav-menu li.active {
background-color: #34495e;
}
.nav-menu a {
color: white;
text-decoration: none;
display: flex;
align-items: center;
}
.nav-menu i {
margin-right: 10px;
width: 20px;
text-align: center;
}
.storage-info {
margin-top: auto;
padding-top: 20px;
}
.storage-text {
display: flex;
justify-content: space-between;
margin-bottom: 10px;
font-size: 0.9rem;
}
.progress-bar {
height: 8px;
background-color: #34495e;
border-radius: 4px;
overflow: hidden;
}
.progress {
height: 100%;
background-color: #3498db;
border-radius: 4px;
}
/* 主内容区样式 */
.main-content {
flex: 1;
padding: 20px;
overflow-y: auto;
}
/* 顶部栏样式 */
.top-bar {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30px;
}
.search-bar {
display: flex;
align-items: center;
background-color: white;
border-radius: 30px;
padding: 10px 20px;
width: 400px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.search-bar i {
color: #7f8c8d;
margin-right: 10px;
}
.search-bar input {
border: none;
outline: none;
width: 100%;
font-size: 0.9rem;
}
.user-profile {
display: flex;
align-items: center;
}
.notifications {
position: relative;
margin-right: 20px;
}
.notifications i {
font-size: 1.2rem;
color: #7f8c8d;
}
.badge {
position: absolute;
top: -5px;
right: -5px;
background-color: #e74c3c;
color: white;
font-size: 0.7rem;
width: 18px;
height: 18px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.avatar img {
width: 40px;
height: 40px;
border-radius: 50%;
object-fit: cover;
}
/* 统计卡片样式 */
.stats-section {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
margin-bottom: 30px;
}
.stats-card {
background-color: white;
border-radius: 10px;
padding: 20px;
display: flex;
align-items: center;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.stats-icon {
width: 50px;
height: 50px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 15px;
font-size: 1.5rem;
}
.files-icon {
background-color: rgba(52, 152, 219, 0.1);
color: #3498db;
}
.folders-icon {
background-color: rgba(155, 89, 182, 0.1);
color: #9b59b6;
}
.shared-icon {
background-color: rgba(46, 204, 113, 0.1);
color: #2ecc71;
}
.usage-icon {
background-color: rgba(230, 126, 34, 0.1);
color: #e67e22;
}
.stats-info h3 {
font-size: 1rem;
font-weight: 500;
margin-bottom: 5px;
color: #7f8c8d;
}
.stats-info p {
font-size: 1.1rem;
font-weight: 600;
color: #2c3e50;
}
/* 最近文件样式 */
.secti.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0