<div class="block"></block>
body {
margin: 0;
padding: 0;
width: 100vw;
min-height: 100vh;
background-color: #000;
display: flex;
justify-content: center;
align-items: center;
}
.block {
position: relative;
width: 50vw;
height: 60vh;
background: linear-gradient(0deg, #000, #272727);
}
.block:before,
.block:after {
content: '';
position: absolute;
left: -.5em;
top: -.5em;
background: linear-gradient(45deg, #fb0094, #0000ff, #00ff00,#ffff00, #ff0000, #fb0094,
#0000ff, #00ff00,#ffff00, #ff0000);
background-size: 400%;
width: calc(100% + 1em);
height: calc(100% + 1em);
z-index: -1;
animation: hue 1s linear infinite;
border-radius: 5px;
}
@keyframes hue {
from {
filter: hue-rotate(0deg);
}
to {
filter: hue-rotate(360deg);
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.