In the Element Plus doc site, the header has a nice shading transparency effect, you can see it in the image below:
How can I achieve a similar transparency effect as the on the Element Plus site header?
I’d like to do my own effect similar to the one above. But I don’t even know where to begin.
I have been researching CSS transparency effects but found nothing that resembles the above. I expect some initial directions to be able to do my own research on this theme
2
Answers
This is the code used on the header, which is .navbar-wrapper on the example site. Place it on your parent nav element and see if that works for you.
Make sure that your navbar is transparent or the effect won’t work.
Leverage radial-gradient, background-size and backdrop-filter
They’re pulling off the "blurred mesh" effect with a clever use of radial-gradient, background-size and backdrop-filter, applied to their navbar:
See demo: https://codepen.io/MarsAndBack/pen/rNPmbxd