Answers for "transition underline on hover"

CSS
1

css hover underline transition left to right

.link:after{
  content: '';
  position: absolute;
  width: 0; height: 3px;
  display: block;
  margin-top: 5px;
  right: 0;
  background: #fff;
  transition: width .2s ease;
  -webkit-transition: width .2s ease;
}
 
.link:hover:after{
  width: 100%;
  left: 0;
  background: #fff;
}
Posted by: Guest on January-22-2021
2

underline css animation hover

.hover-underline-animation {
  display: inline-block;
  position: relative;
  color: #0087ca;
}

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

.hover-underline-animation:hover:after {
  transform: scaleX(1);
  transform-origin: bottom left;
}
Posted by: Guest on June-23-2021

Code answers related to "transition underline on hover"

Browse Popular Code Answers by Language