forked from ayush-that/FinVeda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnavbar.css
152 lines (142 loc) · 2.88 KB
/
navbar.css
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
.overlay {
width: 100%;
height: 100%;
position: absolute;
z-index: 1;
top: 0;
left: 0;
background-color: rgba(51,32,195,0.5);
opacity: 0;
visibility: hidden;
transition: all 0.3s;
}
.mobile-menu {
top: 0;
left: 0;
width: 70vw;
height: 100vh;
position: fixed;
z-index: 2;
background: rgba(51,32,195,0.9);
display: flex;
flex-flow: column nowrap;
justify-content: center;
align-items: center;
transform: translateX(-100%);
transition: transform 0.3s;
}
/* Screen more than 991px wide */
@media ((min-width: 991px)) {
.mobile-menu {
display: none !important;
}
}
.mobile-menu a {
/* box-shadow: inset 0 0 1rem rgba(255,255,255,0.7); */
/* border-top: 3px solid #fff; */
/* border-bottom: 1px solid #fff; */
text-align: center;
margin: 1.5px;
padding: 13px;
color: #fff;
text-decoration: none;
text-transform: uppercase;
position: relative;
font-size: 16px;
}
.mobile-menu a:after {
content: "";
position: absolute;
bottom: 0;
left: 25%;
width: 0;
height: 2px;
background-color: white;
transition: width 0.3s;
}
.mobile-menu a:hover:after {
width: 50%;
}
.mobile-menu li a:hover:after {
width: 0;
}
.mobile-menu .active-link {
background:
linear-gradient(white 0 0) bottom/ 100% 2px no-repeat,
transparent;
}
.mobile-menu__trigger {
cursor: pointer;
content: "";
position: absolute;
z-index: 3;
width: 3rem;
height: 3rem;
border-radius: 50%;
top: 2rem;
right: -5rem;
background: rgba(51,32,195,0.5);
display: flex;
justify-content: center;
align-items: center;
}
.mobile-menu__trigger span {
display: block;
width: 50%;
height: 2px;
background: #fff;
position: relative;
}
.mobile-menu__trigger span::before,
.mobile-menu__trigger span::after {
content: "";
position: absolute;
width: 100%;
height: 2px;
right: 0;
background: #fff;
transition: all 0.3s;
}
.mobile-menu__trigger span::before {
top: -7px;
}
.mobile-menu__trigger span::after {
top: 7px;
}
.mobile-menu__trigger:hover span::before {
width: 50%;
top: -3px;
right: 0;
transform: rotate(30deg);
}
.mobile-menu__trigger:hover span::after {
width: 50%;
top: 3px;
right: 0;
transform: rotate(-30deg);
}
.mobile-menu_open {
transform: translateX(0%);
box-shadow: 0 0 2rem #000;
}
.mobile-menu_open+.overlay {
visibility: visible;
opacity: 1;
}
.mobile-menu_open .mobile-menu__trigger span::before,
.mobile-menu_open .mobile-menu__trigger span::after {
left: 0;
}
.mobile-menu_open .mobile-menu__trigger:hover span::before {
transform: rotate(-30deg);
}
.mobile-menu_open .mobile-menu__trigger:hover span::after {
transform: rotate(30deg);
}