How To Create Text Animation On Hover

In this topic,

we are going to see how to create a text animation on hover using.

Step-1: Create Html Code in the index.html file.


Now use CSS to show the animation on scroll.

Step-2: Add CSS in<style>…</style> tag on index.html file.

  padding: 0;
  margin: 0;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh
  color: #484848;
  font-size: 50px;
  font-weight: bold;
  font-family: monospace;
  letter-spacing: 7px;
  cursor: pointer
h1 span{
  transition: .5s linear
h1:hover span:nth-child(1){
  margin-right: 5px
h1:hover span:nth-child(1):after{
  content: "'";
h1:hover span:nth-child(2){
  margin-left: 30px
h1:hover span{
  color: #fff;
  text-shadow: 0 0 10px #fff,
  0 0 20px #fff, 
  0 0 40px #fff;

Review the below video.

I hope you guys found something useful  ??

1 Comment

  1. wonderful text animation


Submit a Comment

Your email address will not be published.


Select Categories