Unique CSS Button Hover Animation

By: The Softorax Development Team

HTML

				
					<a href="#" class="lnbtn">
        <span class="lnbtnrt">Hover Me</span>
    </a>
				
			

CSS

				
					body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: #000000;
}

.lnbtn {
  text-decoration: none;
  display: flex;
  align-items: center;
  background: #000000;
  border: none;
}

.lnbtn::before {
  content: "";
  display: block;
  background: rgba(255, 255, 255, 0.5);
  width: 80px;
  height: 1px;
  transition: width 0.5s;
  margin: 0 10px;
}

.lnbtn::after {
  content: "";
  display: block;
  background: rgba(255, 255, 255, 0.5);
  width: 0;
  height: 1px;
  transition: width 0.5s;
  margin: 0 10px;
}

.lnbtnrt {
  display: flex;
  align-items: center;
  color: #ffffff;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 4px;
  transition: color 0.3s;
}

.lnbtnrt::before {
  content: "";
  display: block;
  height: 10px;
  width: 10px;
  background: #e30039;
  margin: 0 10px;
  border-radius: 50px;
  transition: 0.3s;
}

.lnbtn:hover::before {
  width: 0;
}

.lnbtn:hover::after {
  width: 80px;
}

.lnbtn:hover .lnbtnrt {
  color: #e30039;
}

.lnbtn:hover .lnbtnrt::before {
  background: #ffffff;
}

				
			

Final Result

The Best WordPress Web Development Agency

Schedule a call

Let us get back to you