Back to Snippets

Apple Style Glassmorphism Navbar CSS

A dark navigation bar that stays at the top of the page and blurs whatever scrolls beneath it. There is no JavaScript, so it works the moment the CSS loads.

The frost is backdrop-filter with a blur and a saturate boost. The saturate value is what stops the blurred content looking washed out, since blurring on its own drains color. A translucent background sits over the filter, and the bar needs that partial transparency or there is nothing for the filter to reveal.

Positioning is sticky rather than fixed, so the bar keeps its place in the document flow and the content below does not jump up under it. Safari needs the webkit prefixed copy of the filter, which is included. Where backdrop-filter is unsupported the bar degrades to a plain translucent panel rather than breaking.

574
#css
#navbar
#navigation
#glassmorphism
#sticky
#apple style
#header
#ui