console
<div id="out"></div>
#out {
background: #fc0;
border-radius: 20px;
position: relative;
width: 100px;
height: 100px;
flex-shrink: 0;
margin: 50px;
overflow: unset;
}
#out::before,
#out::after {
content: '';
position: absolute;
left: -6px;
border-radius: 20px;
top: -6px;
width: calc(100% + 12px);
height: calc(100% + 12px);
background: #333;
background-image: linear-gradient(45deg, #ff3c41, #ff8a25, #ffe04f, #4fff88, #56ffef, #37b4ff, #c05aff, #ff3c41, #ff8a25, #ffe04f, #4fff88, #56ffef, #37b4ff, #c05aff);
background-size: 500%;
animation: position 12s linear infinite alternate;
z-index: -1;
}
#out::after {
filter: blur(10px);
}
@keyframes position {
0% {
background-position: 0 0;
}
50% {
background-position: 400% 0;
}
100% {
background-position: 0 0;
}
}