Files
est-moni/src/pages/Control/Control.module.css
2025-10-22 03:33:11 +00:00

124 lines
2.1 KiB
CSS

.container {
display: flex;
min-height: 100vh;
background-color: #f8f7fc;
position: relative;
}
.sidebar {
width: 240px;
background-color: #fff;
box-shadow: 2px 0 8px rgba(111, 66, 193, 0.1);
padding: 20px 0;
transition: transform 0.3s ease;
}
.menuTitle {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 20px;
font-weight: bold;
color: #6f42c1;
padding: 16px 24px;
border-bottom: 1px solid #ede8f7;
margin-bottom: 8px;
}
.menuToggle {
display: none;
background: none;
border: none;
color: #6f42c1;
cursor: pointer;
padding: 8px;
position: fixed;
top: 10px;
left: 10px;
z-index: 1000;
border-radius: 4px;
background-color: white;
box-shadow: 0 2px 4px rgba(111, 66, 193, 0.1);
}
.menu {
display: flex;
flex-direction: column;
padding: 8px 0;
}
.menuItem {
display: flex;
align-items: center;
padding: 12px 24px;
font-size: 16px;
color: #595959;
background: none;
border: none;
text-align: left;
cursor: pointer;
transition: all 0.3s ease;
}
.menuItem:hover {
color: #6f42c1;
background-color: #f3f0f9;
}
.menuItem.active {
color: #6f42c1;
background-color: #f3f0f9;
border-right: 3px solid #6f42c1;
font-weight: 500;
}
.content {
flex: 1;
padding: 24px;
background-color: #fff;
margin: 24px;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(111, 66, 193, 0.08);
}
/* 响应式设计 */
@media screen and (max-width: 768px) {
.container {
flex-direction: column;
}
.menuToggle {
display: block;
}
.sidebar {
position: fixed;
top: 0;
left: 0;
height: 100vh;
z-index: 999;
transform: translateX(-100%);
}
.sidebar.open {
transform: translateX(0);
}
.content {
margin: 60px 16px 16px 16px;
padding: 16px;
}
}
/* 小屏幕手机 */
@media screen and (max-width: 480px) {
.content {
margin: 60px 8px 8px 8px;
padding: 12px;
}
.menuItem {
padding: 10px 16px;
font-size: 14px;
}
}