Dazzle Your Visitors with This Animated Glowing Button Background Effect in Elementor

So if you follow along in the video, I refer to this blog post for you to enter code at certain points, so below is everything you will need!

The Following code goes into the button widget (Animated background glow effect):

				
					/* First, define the --rotate property as animatable */
@property --rotate {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

selector {
  --first-color: #B96DED; 
  --second-color: #EDBE6D;
  --third-color: #6DEDA3;
  --size-of-blur: 20px;
  --spin-speed: 2.5s;
  --spread-scale: 1.1;
  --pulse-opacity: 0.6;
  --glow-border-radius: 40px;
  
  position: relative; /* Ensure proper positioning context */
  z-index: 1; /* Set a higher z-index for the button */
}

selector::before, 
selector::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 100%;
  z-index: -1;
  height: 100%;
  border-radius: var(--glow-border-radius); /* Inherit border radius from the button */
  background-image: linear-gradient(
    var(--rotate),
    var(--first-color),
    var(--second-color) 43%,
    var(--third-color)
  );
  opacity: 0;
  pointer-events: none; /* Ensure it doesn't interfere with interactions */
  animation: pulse var(--spin-speed) ease-in-out infinite;
}

selector::after {
  filter: blur(var(--size-of-blur));
  transform: scale(var(--spread-scale));
}

@keyframes pulse {
  0% {
    --rotate: 0deg;
    opacity: var(--pulse-opacity);
  }
  50% {
    --rotate: 180deg;
    opacity: 1;
  }
  100% {
    --rotate: 360deg;
    opacity: var(--pulse-opacity);
  }
}
				
			

The Following code goes into the button widget (Complete Animated glow effect):

				
					/* First, define the --rotate property as animatable */
@property --rotate {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

selector {
  --first-color: #B96DED; 
  --second-color: #EDBE6D;
  --third-color: white;
  --size-of-blur: 20px;
  --spin-speed: 2.5s;
  --spread-scale: 1.1;
  --pulse-opacity: 0.6;
  --glow-border-radius: 50px;
  
  position: relative; /* Ensure proper positioning context */
  z-index: 1; /* Set a higher z-index for the button */
}

selector:hover::before, 
selector:hover::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 100%;
  z-index: -1;
  height: 100%;
  border-radius: var(--glow-border-radius); /* Inherit border radius from the button */
  background-image: linear-gradient(
    var(--rotate),
    var(--first-color),
    var(--second-color) 43%,
    var(--third-color)
  );
  opacity: 0;
  pointer-events: none; /* Ensure it doesn't interfere with interactions */
  animation: pulse var(--spin-speed) ease-in-out infinite;
}

selector::after {
  filter: blur(var(--size-of-blur));
  transform: scale(var(--spread-scale));
}

@keyframes pulse {
  0% {
    --rotate: 0deg;
    opacity: var(--pulse-opacity);
  }
  50% {
    --rotate: 180deg;
    opacity: 1;
  }
  100% {
    --rotate: 360deg;
    opacity: var(--pulse-opacity);
  }
}
				
			

Other Articles

How To Make A Vertical 3D Gallery Slider

https://youtu.be/BWoXciYFn-Q So if you follow along in the video, I refer to this blog post for you to enter code ...

How To Make A Horizontal 3D Gallery Slider

So if you follow along in the video, I refer to this blog post for you to enter code at ...

How To Make A Auto Rotating 3D Carousel

So if you follow along in the video, I refer to this blog post for you to enter code at ...

How To Make A 3D Carousel For Products

So if you follow along in the video, I refer to this blog post for you to enter code at ...