Skip to content

Commit 59f76fc

Browse files
committed
add animation menubar
1 parent e17a1ed commit 59f76fc

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

css/index.css

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,67 @@
164164
height: 35px;
165165
}
166166

167+
#navigation-bar .menubar {
168+
animation: menuPromptNudge 6.8s ease-in-out 3s infinite;
169+
transform-origin: center;
170+
}
171+
172+
#navigation-bar .menubar::after {
173+
content: "";
174+
position: absolute;
175+
inset: -12px;
176+
border: 1px solid rgba(0, 209, 255, 0.42);
177+
border-radius: 18px;
178+
opacity: 0;
179+
pointer-events: none;
180+
animation: menuPromptHalo 6.8s ease-out 3s infinite;
181+
}
182+
183+
@keyframes menuPromptNudge {
184+
0%, 62%, 100% {
185+
transform: translateY(0) scale(1);
186+
opacity: .8;
187+
}
188+
68% {
189+
transform: translateY(-2px) scale(1.04);
190+
opacity: 1;
191+
}
192+
72% {
193+
transform: translateY(0) scale(1);
194+
opacity: 1;
195+
}
196+
76% {
197+
transform: translateY(-1px) scale(1.03);
198+
opacity: 1;
199+
}
200+
82% {
201+
transform: translateY(0) scale(1);
202+
opacity: .95;
203+
}
204+
}
205+
206+
@keyframes menuPromptHalo {
207+
0%, 62%, 100% {
208+
opacity: 0;
209+
transform: scale(.92);
210+
}
211+
68% {
212+
opacity: .6;
213+
transform: scale(1);
214+
}
215+
82% {
216+
opacity: 0;
217+
transform: scale(1.16);
218+
}
219+
}
220+
221+
@media (prefers-reduced-motion: reduce) {
222+
#navigation-bar .menubar,
223+
#navigation-bar .menubar::after {
224+
animation: none;
225+
}
226+
}
227+
167228
.cursor{
168229
height: 50px;
169230
width: 50px;

0 commit comments

Comments
 (0)