← All elements

Frosted Floating Nav

by @admin · 0 views

<div class="ff" tabindex="0" aria-label="Scrollable preview"><nav><a href="#" class="on">Home</a><a href="#">Work</a><a href="#">Blog</a></nav><i></i><i></i><i></i><i></i></div>

About this layout

A pill navigation bar with a frosted glass backdrop that floats over colourful scrolling content.

How it works

The navigation is sticky inside the scrolling box and has a semi-transparent white background with backdrop-filter blur and extra saturation, so colours passing underneath glow through. A negative bottom margin lets the content start beneath the bar.

Ways to customise it

  • Change the 10px blur and saturation.
  • Change the white opacity for a clearer or milkier glass.
  • Swap the colour blocks for your content.

Good to know

Test text contrast over your darkest and brightest content, because the backdrop changes while scrolling. Without backdrop-filter support the bar is simply a translucent white.

Open an example, copy the HTML and the CSS, and paste them into your page. There is nothing to install and no JavaScript to load.

More in Layout

View all →