css
*{
margin: 0;
padding: 0;
box-sizing: border-box
}
.shadow{
position: relative;
width: 900px;
height: 450px;
background: #111;
margin: 200px auto;
color: #fff;
font-size: 1.5em;
text-align: center;
line-height: 50px;
}
.shadowb::before,.shadow::after{
content: " ";
position: absolute;
width:calc(100% + 6px);
height:calc(100% + 6px);
top: -3px;
left: -3px;
background: linear-gradient(45deg,#fc0090,#0000ff,#00ff00,#ff0000,#ffff00,#fc0090,#0000ff,#00ff00,#ff0000,#ffff00);
background-size:300%;
z-index:-1;
animation:shadow 15s linear infinite;
}
.shadow::after{
filter: blur(30px);
}
@keyframes shadow{
0%{background-position:0 0;}
50%{background-position:300% 0}
100%{background-position:0 0 ;}
}
html
<div class="shadow">
