You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

174 lines
2.7 KiB

html,
body {
margin: 0;
padding: 0;
height: 100%;
font-family: Arial, sans-serif;
color: #333;
}
body {
min-height: 100vh;
display: flex;
flex-direction: column;
background-color: #fcfcfc;
}
.page-layout {
flex: 1;
display: flex;
flex-direction: column;
}
.page {
width: 100%;
/* display: flex; */
/* flex-direction: column; */
flex: 1;
position: relative;
}
.container {
max-width: 1226px;
margin-right: auto;
margin-left: auto;
/* padding-left: 20px;
padding-right: 20px; */
}
@media (max-width: 640px) {
.container {
padding-left: 10px;
padding-right: 10px;
}
}
.clearfix::after {
content: '';
display: table;
clear: both;
}
.navbar-brand {
float: left;
height: 100%;
display: flex;
align-items: center;
}
/* ===== 顶部导航 响应式 ===== */
.navbar {
position: relative;
}
.navbar .menu-toggle {
display: none;
position: absolute;
right: 12px;
top: 50%;
transform: translateY(-50%);
width: 40px;
height: 40px;
border: none;
background: transparent;
padding: 0;
cursor: pointer;
}
.navbar .menu-toggle .bar {
display: block;
width: 22px;
height: 2px;
background: #333;
margin: 5px auto;
transition: transform .2s ease, opacity .2s ease;
}
.navbar .mobile-menu {
display: none;
position: relative;
overflow: hidden;
max-height: 0;
transition: max-height .25s ease;
background: rgba(255, 255, 255, 0.95);
border-radius: 0 0 12px 12px;
box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}
.navbar.open .mobile-menu {
display: none;
max-height: 400px;
}
.navbar .mobile-menu .menu-item {
display: block;
padding: 12px 0;
}
/* 桌面端可见区域 */
.desktop-only {
display: block;
}
/* <= 1024 宽度:显示切换按钮,隐藏桌面菜单 */
@media (max-width: 1024px) {
.desktop-only {
display: none;
}
.navbar .menu-toggle {
display: inline-block;
}
.navbar .mobile-menu {
padding: 8px 20px 12px;
}
.navbar.open .mobile-menu {
display: block;
}
}
.menu {
height: 100%;
margin-left: 20px;
.menu-item {
height: 100%;
display: flex;
align-items: center;
padding: 0 10px;
cursor: pointer;
&:hover {
background: rgba(175, 175, 175, 0.1);
}
}
}
.menu.left {
float: left;
.menu-item {
float: left;
&+.menu-item {
margin-left: 5px;
}
}
}
.right.menu {
float: right;
.menu-item {
float: right;
&+.menu-item {
margin-right: 5px;
}
}
}