UNPKG

animarte

Version:

Making the digital world a little more animated place

53 lines (51 loc) 1.41 kB
.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-lines--stretching-1 .animarte-lines__element { position: absolute; top: 50%; transform: translateY(-50%); width: 10%; background-color: currentColor; animation-name: linesStretching1; animation-timing-function: linear; animation-iteration-count: infinite; animation-duration: var(--animarte-speed); } .animarte-lines--stretching-1 .animarte-lines__element:nth-of-type(1) { animation-delay: calc(var(--animarte-speed) * 0.2 * 1); } .animarte-lines--stretching-1 .animarte-lines__element:nth-of-type(2) { animation-delay: calc(var(--animarte-speed) * 0.2 * 2); } .animarte-lines--stretching-1 .animarte-lines__element:nth-of-type(3) { animation-delay: calc(var(--animarte-speed) * 0.2 * 3); } .animarte-lines--stretching-1 .animarte-lines__element:nth-of-type(4) { animation-delay: calc(var(--animarte-speed) * 0.2 * 4); } .animarte-lines--stretching-1 .animarte-lines__element:nth-of-type(5) { animation-delay: calc(var(--animarte-speed) * 0.2 * 5); } @keyframes linesStretching1 { 0% { height: 0%; left: 0%; } 50% { height: 80%; left: 50%; } 100% { height: 0%; left: 100%; transform: translate(-100%, -50%); } }