animarte
Version:
Making the digital world a little more animated place
54 lines (52 loc) • 1.29 kB
CSS
.animarte {
position: relative;
isolation: isolate;
box-sizing: border-box;
overflow: hidden;
flex-shrink: 0;
width: var(--animarte-size);
height: var(--animarte-size);
color: var(--animarte-color);
}
.animarte-circles--agitated-1 .animarte-circles__element {
position: absolute;
top: 50%;
width: 20%;
height: 20%;
border-radius: 100vw;
background: currentColor;
animation-name: circlesAgitated1;
animation-duration: var(--animarte-speed);
animation-iteration-count: infinite;
animation-timing-function: ease-in-out;
}
.animarte-circles--agitated-1 .animarte-circles__element:nth-of-type(1) {
opacity: calc(1 / 1);
animation-delay: calc(var(--animarte-speed) * 0.02 * 1);
}
.animarte-circles--agitated-1 .animarte-circles__element:nth-of-type(2) {
opacity: calc(1 / 2);
animation-delay: calc(var(--animarte-speed) * 0.02 * 2);
}
.animarte-circles--agitated-1 .animarte-circles__element:nth-of-type(3) {
opacity: calc(1 / 3);
animation-delay: calc(var(--animarte-speed) * 0.02 * 3);
}
@keyframes circlesAgitated1 {
0%, 100% {
left: 0%;
height: 20%;
transform: translate(0%, -50%);
}
25% {
height: 16%;
}
50% {
left: 100%;
height: 20%;
transform: translate(-100%, -50%);
}
75% {
height: 15%;
}
}