dm-design/左侧菜单.html

228 lines
5.8 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>管理后台</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background-color: #f5f5f5;
color: #333;
}
.container {
max-width: 400px;
margin: 20px auto;
background: white;
border: 2px solid #4A90E2;
border-radius: 8px;
overflow: hidden;
}
.header {
background: white;
border-bottom: 2px solid #4A90E2;
padding: 10px;
}
.tab {
display: inline-block;
padding: 8px 16px;
border: 2px solid #4A90E2;
background: white;
color: #333;
font-size: 16px;
margin-right: 10px;
border-radius: 4px;
}
.current-section {
background: #4A90E2;
color: white;
padding: 15px;
text-align: center;
font-size: 18px;
font-weight: bold;
}
.menu-section {
border-bottom: 2px solid #4A90E2;
}
.menu-title {
padding: 15px;
background: white;
border-bottom: 1px solid #e0e0e0;
display: flex;
align-items: center;
font-size: 16px;
font-weight: bold;
}
.checkbox {
width: 20px;
height: 20px;
border: 2px solid #4A90E2;
margin-right: 15px;
background: white;
}
.menu-items {
padding-left: 35px;
}
.menu-item {
padding: 12px 20px;
border: 2px solid #4A90E2;
margin: 10px;
background: white;
color: #4A90E2;
font-size: 14px;
border-radius: 4px;
cursor: pointer;
transition: all 0.3s ease;
}
.menu-item:hover {
background: #4A90E2;
color: white;
}
.submenu-section {
padding: 15px;
}
.submenu-title {
padding: 10px 15px;
border: 2px solid #4A90E2;
background: white;
color: #4A90E2;
font-size: 16px;
margin-bottom: 15px;
border-radius: 4px;
cursor: pointer;
transition: all 0.3s ease;
}
.submenu-title:hover {
background: #4A90E2;
color: white;
}
.submenu-items {
margin-left: 20px;
}
.submenu-item {
padding: 8px 15px;
border: 2px solid #4A90E2;
background: white;
color: #4A90E2;
font-size: 14px;
margin-bottom: 8px;
border-radius: 4px;
cursor: pointer;
transition: all 0.3s ease;
}
.submenu-item:hover {
background: #4A90E2;
color: white;
}
.empty-space {
height: 200px;
background: white;
border-top: 2px solid #4A90E2;
}
@media (max-width: 480px) {
.container {
margin: 10px;
max-width: none;
}
.tab {
font-size: 14px;
padding: 6px 12px;
}
.current-section {
font-size: 16px;
padding: 12px;
}
}
</style>
</head>
<body>
<div class="container">
<!-- Header -->
<div class="header">
<div class="tab">首页</div>
</div>
<!-- Current Section -->
<div class="current-section">
当前选中
</div>
<!-- Operations Management Section -->
<div class="menu-section">
<div class="menu-title">
<div class="checkbox"></div>
运营管理
</div>
<div class="menu-items">
<div class="menu-item">消息群发</div>
<div class="menu-item">用户消息</div>
<div class="menu-item">自动回复</div>
<div class="menu-item">待巳设置</div>
</div>
</div>
<!-- Marketing Tools Section -->
<div class="menu-section">
<div class="menu-title">
<div class="checkbox"></div>
营销工具
</div>
</div>
<!-- Member Functions Section -->
<div class="submenu-section">
<div class="submenu-title">会员功能</div>
<div class="submenu-items">
<div class="submenu-item">会员管理</div>
<div class="submenu-item">会员列表</div>
</div>
</div>
<!-- Empty Space -->
<div class="empty-space"></div>
</div>
<script>
// Add click functionality to menu items
document.querySelectorAll('.menu-item, .submenu-item, .submenu-title').forEach(item => {
item.addEventListener('click', function() {
console.log('Clicked:', this.textContent);
// You can add navigation logic here
});
});
// Add checkbox toggle functionality
document.querySelectorAll('.checkbox').forEach(checkbox => {
checkbox.addEventListener('click', function() {
this.style.backgroundColor = this.style.backgroundColor === 'rgb(74, 144, 226)' ? 'white' : '#4A90E2';
});
});
</script>
</body>
</html>