Fade-away Loading Effect
Hello!
So I've been building up this navbar for a while... and yesterday I thought it would be a good idea to add a loading state to it. However, upon putting the final touches, I'm running into a minor inconvenience.
I want the loading indicator
.navbar-container::after
to disappear and come in with the background graident of nav::after
. I can do this somewhat with replacing the transparent parameter to the background color, however this makes the navbar not look the best or as easily viewable:
⏬
Attached are labelled videos and images of my problem, and I also tried messing with the loading animations but it's not the desired effect.
Here is the code in question (Nav.astro):
Changing the transparent
to var(--background)
is really close. Is there anyway to do that but not having the background color visible or to mimic this effect?
CodeSandBox: https://codesandbox.io/p/github/KingPr0o7/portfolio/main?import=true (src/components/Nav.astro) (dev:4321)
(Clicking on links are slowed to simulate loading)0 Replies