<!-- Recreated from https://codepen.io/mike-schultz/pen/NgQvGO?editors=1100 -->

<div class="gradient-border" id="box">
  Animated
  <br/>
  CSS Gradient
  <br/>
  Border
  <br/>
</div>
/* Recreated from https://codepen.io/mike-schultz/pen/NgQvGO?editors=1100  */

@import url('https://fonts.googleapis.com/css?family=Raleway:200');

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: #1D1F20;
  display: flex;
  justify-content: center;
  align-items: center;
}

#box {
  color: white;
  font-family: raleway;
  font-size: 2.5rem;
  font-weight: bolder;
  height: 200px;
  width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gradient-border {
  --borderWidth: 3px;
  border-radius: var(--borderWidth);
  position: relative;
  background: #1D1F20;
}

.gradient-border:after {
  content: "";
  height: calc(100% + var(--borderWidth) * 3);
  width: calc(100% + var(--borderWidth) * 3);
  background: linear-gradient(60deg, #f79533, #f37055, #ef4e7b, #a166ab, #5073b8, #1098ad, #07b39b, #6fba82);
  background-size: 300% 300%;
  position: absolute;
  z-index: -1;
  border-radius: var(--borderWidth);
  animation: animationGradient 3s ease alternate infinite;
}

@keyframes animationGradient {
  0% {
    background-position: 0% 50%;
  }
  
  50% {
    background-position: 50% 100%;
  }
  100% {
    background-position: 100% 0%;
  }
}
// Recreated from https://codepen.io/mike-schultz/pen/NgQvGO?editors=1100 
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://codepen.io/navinnavi19/pen/aboQoVX.js