-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmobile-menu.css
More file actions
67 lines (59 loc) · 1.41 KB
/
mobile-menu.css
File metadata and controls
67 lines (59 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* 移动端汉堡菜单样式 */
.mobile-menu-toggle {
display: none;
flex-direction: column;
justify-content: space-between;
width: 30px;
height: 24px;
background: transparent;
border: none;
cursor: pointer;
padding: 0;
z-index: 1001;
}
.mobile-menu-toggle span {
width: 100%;
height: 3px;
background: var(--text-primary);
border-radius: 2px;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu-toggle.active span:nth-child(1) {
transform: rotate(45deg) translate(7px, 7px);
}
.mobile-menu-toggle.active span:nth-child(2) {
opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
transform: rotate(-45deg) translate(7px, -7px);
}
@media (max-width: 768px) {
.mobile-menu-toggle {
display: flex;
}
.navbar-nav {
position: fixed;
top: 64px;
left: -100%;
width: 100%;
height: calc(100vh - 64px);
background: white;
flex-direction: column;
align-items: center;
justify-content: flex-start;
padding-top: 40px;
gap: 0;
transition: left 0.3s ease;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.navbar-nav.active {
left: 0;
}
.nav-link {
width: 100%;
text-align: center;
padding: 20px;
font-size: 1.1rem;
border-bottom: 1px solid var(--border-color);
}
}