Blake Lundquist writes about simplifying the overly complex world of front-end development using vanilla JavaScript and CSS. He is currently a software engineer at Acast.
In this tutorial, Blake Lundquist walks us through two methods of creating the “moving-highlight” navigation pattern using only plain JavaScript and CSS. The first technique uses the getBoundingClientRect method to explicitly animate the border between navigation bar items when they are clicked. The second approach achieves the same functionality using the new View Transition API.
Read more…