animarte
Version:
Making the digital world a little more animated place
50 lines (48 loc) • 1.43 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--rotating-1 {
display: grid;
justify-items: center;
align-items: center;
}
.animarte-circles--rotating-1 .animarte-circles__element {
grid-area: 1/1;
margin: 0;
width: 100%;
height: 100%;
border-radius: 50%;
background: transparent;
border: calc(var(--animarte-size) * 0.1) solid currentColor;
animation-name: circlesRotating1;
animation-duration: var(--animarte-speed);
animation-iteration-count: infinite;
animation-timing-function: linear;
}
.animarte-circles--rotating-1 .animarte-circles__element:nth-of-type(1) {
width: calc(100% - 30% * (1 - 1));
height: calc(100% - 30% * (1 - 1));
animation-delay: calc(var(--animarte-speed) / 2 / 4 * 1);
}
.animarte-circles--rotating-1 .animarte-circles__element:nth-of-type(2) {
width: calc(100% - 30% * (2 - 1));
height: calc(100% - 30% * (2 - 1));
animation-delay: calc(var(--animarte-speed) / 2 / 4 * 2);
}
.animarte-circles--rotating-1 .animarte-circles__element:nth-of-type(3) {
width: calc(100% - 30% * (3 - 1));
height: calc(100% - 30% * (3 - 1));
animation-delay: calc(var(--animarte-speed) / 2 / 4 * 3);
}
@keyframes circlesRotating1 {
50% {
transform: rotate3d(1, 1, 1, 1turn);
}
}