POC Progressive underline hover effect

In this example below you will see how to do a POC Progressive underline hover effect with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by tibomahe, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright tibomahe ©
  • HTML
  • CSS
  • JavaScript
    <div class="container">
  <h2>Hello are u tranquilou bilou ?</h2>
</div>

/*Downloaded from https://www.codeseek.co/tibomahe/poc-progressive-underline-hover-effect-gwJYKG */
    .container {
   width: 250px;
   margin: 20px auto; 
}

h2 {
  display: inline;
  font-size: 50px;
  /* effect */
  background-image: linear-gradient(180deg,transparent 65%, #f7c5d4 0);
	background-size: 0 100%;
	background-repeat: no-repeat;
  transition: background-size .4s ease;
}

h2:hover {
  background-size: 100% 100%;
	cursor: pointer;
}


/*Downloaded from https://www.codeseek.co/tibomahe/poc-progressive-underline-hover-effect-gwJYKG */
    

Comments