What We Learned: Pure CSS Nav Thumb Flip on Scroll Failures

What We Learned: Pure CSS Nav Thumb Flip on Scroll Failures

1 Min Read

A recent CodePen Spark led me to this interesting demo. It has a cool effect, but I thought it used too much JavaScript, so I decided on a CSS version. Plus, I thought it would look better if the flip effect was “hinged” on the top/bottom edge, depending on the direction.

After about half an hour, I created this:

Animated GIF showing the final result, with each nav item getting selected at a corresponding scroll progression. Once selected, its text gets darker and moves slightly to the right, while its image flips into view rotating around the top edge. Once an item is deselected, its text fades and moves back to the left, and its image flips out of view rotating around the bottom edge.
recording of my result

Let’s explore how I did it… and what went wrong.

The Layout Basics

We have a

You might also like