Glowing Effects on CSS Buttons using HTML & CSS

Hello readers, Today in this blog you’ll learn how to create a Glowing Effect on Buttons in HTML & CSS only.
As you can see in the image, there is a button with a cool border glowing effect. At first, the button is in the initial stage where there are no glowing effects on the background. But when you hover on the button then the glowing effect starts. This effect fully based on CSS only.

If you’re feeling difficulty to understanding what I’m saying then you can Try the code below to check the output yourself.Still facing issues? Feel free to mail us your queries on


<!DOCTYPE html>
<!-- Created By praveen kumar -->
<html lang="en" dir="ltr">
    <meta charset="utf-8">
    <title>Glowing Button on Hover</title>
    <link rel="stylesheet" href="blog.css">
    <button>Hover Me</button>



@import url("");
  margin: 0;
  padding: 0;
  display: flex;
  height: 100vh;
  background: black;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 60px;
  width: 200px;
  border: none;
  outline: none;
  color: white;
  background: #111;
  cursor: pointer;
  border-radius: 5px;
  font-size: 18px;
  font-family: 'Raleway', sans-serif;
  position: absolute;
  content: '';
  top: -2px;
  left: -2px;
  height: calc(100% + 4px);
  width: calc(100% + 4px);
  border-radius: 5px;
  z-index: -1;
  opacity: 0;
  filter: blur(5px);
  background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
  background-size: 400%;
  transition: opacity .3s ease-in-out;
  animation: animate 20s linear infinite;
  opacity: 1;
  background: none;
  filter: blur(2px);
@keyframes animate {
  0% { background-position: 0 0; }
  50% { background-position: 400% 0; }
  100% { background-position: 0 0; }