Glowing Gradient Button with Hover Effect using HTML & CSS

Glowing Gradient Button with Hover Effect using HTML & CSS

Hello developers, today in this blog, you'll learn to create a Glowing Gradient Button with Hover Effect using HTML & CSS.


A button is a fundamental UI element that heavily affects your interaction design of the website between the user. This glowing button can be used in websites to highlight your webpage.

In this blog (Glowing Gradient Button with Hover Effect), there are two buttons on the center of the webpage. Usually, the button is made with gradient colors. When you hover over the button, the button will glow which shows you a glowing gradient button. The hover effect has been used in this Glowing Gradient Button.

The source code of this User Glowing Gradient Button with Hover Effect is given below, if you want the source code of this program, you can copy it. You can use this Glowing Gradient Button with Hover Effect with your creativity and can take this project to the next level.

Glowing Gradient Button with Hover Effect [Source Code]

To make this website, you would like to make two files: an HTML file & a CSS file. First, create an HTML file with the name of index.html and remember, you have to create a file with a .html extension.

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Glowing Gradient Button with Hover Effect || Learningrobo</title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="container"> <ul> <li><a href=""><span>Learning Robo</span></a></li> <li><a href=""><span>Learning Robo</span></a></li> <li><a href=""><span>Learning Robo</span></a></li> <li><a href=""><span>Learning Robo</span></a></li> </ul> <div class="credit">Made with <span style="color:tomato">❤</span> by <a href="https://www.learningrobo.com/">Learning Robo</a></div> </div> </body> </html>
CSS provides style to an HTML page. To make the page attractive create a CSS file with the name style.css and remember that you have to make a file with a .css extension.


body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #1b141a;
  font-family: 'Poppins', sans-serif;
}
ul {
  margin: 0;
  padding: 0;
  display: flex;
}
ul li {
  position: relative;
  list-style: none;
  width: 230px;
  height: 70px;
  margin: 0 10px;
  border-radius: 25px;
  box-sizing: border-box;
}
ul li:before,
ul li:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 25px;
  filter: blur(20px);
  opacity: 0;
  transition: 1s;
  z-index: -1;
}
ul li:after {
  filter: blur(40px);
}
ul li:hover:after,
ul li:hover:before {
  opacity: 1;
}
ul li a {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  text-align: center;
  color: #000;
  background: #000;
  font-size: 15px;
  border-radius: 25px;
  line-height: 50px;
  text-decoration: none;
}

ul li a span {
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: 0.5s;
  transform: rotateY(0deg) scale(0.8);
  opacity: 0.2;
}

ul li a:hover span {
  opacity: 1;
  transform: scale(1.2);
}

ul li:nth-child(1) a,
ul li:nth-child(1):before,
ul li:nth-child(1):after{
  background-image: linear-gradient(45deg, #85FFBD 0%, #FFFB7D 100%);
}

ul li:nth-child(2) a,
ul li:nth-child(2):before,
ul li:nth-child(2):after{
  background-image: linear-gradient(19deg, #21D4FD 0%, #B721FF 100%);
}

ul li:nth-child(3) a,
ul li:nth-child(3):before,
ul li:nth-child(3):after{
  background: linear-gradient(to right, #F9D423, #e65c00);;
}

ul li:nth-child(4) a,
ul li:nth-child(4):before,
ul li:nth-child(4):after{
  background: linear-gradient(to right, #185a9d, #43cea2);
}
.credit a{
  text-decoration: none;
  color: #85FFBD;
  font-weight: bold;
}
.credit {
  text-align: center;
  color: #fff;
  margin-top: 30px;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}
We hope you would like this Glowing Gradient Button with Hover Effect using HTML & CSS.

Thank you for reading our blog. If you face any problem in creating this Glowing Gradient Button with Hover Effect using HTML & CSS, then contact us or comment us. We’ll try to provide a solution to your problem as soon as possible.

Thank you
Learning robo team

Post a Comment

Thank you
Learning robo team

Post a Comment (0)

Previous Post Next Post
Learning Robo says...
code copied
Welcome