Beauty underline lateral hover animation

Written by Francisco Gonzalez

Published on: 2024-02-05

This is a beauty hover effect for U.

The full Astro logo.

class:"hover-underline-animation"

.hover-underline-animation {
  position: relative;
}

.hover-underline-animation:hover:after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.hover-underline-animation:after {
  content: "";
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #f65252;
  transform-origin: bottom right;
  transition: transform .15s ease-out;
}