Spinner

Stolen spinner from codepen

by AntowaKartowa

HTML

<div class="container">
	<svg class="spinner" viewBox="0 0 50 50">
		<circle class="path" cx="25" cy="25" r="20" fill="none" stroke-width="5" stroke="yellow"></circle>
	</svg>
</div>

SCSS

html, body {
  height: 100%;
  background-image: linear-gradient(-105deg, #009acc, #363795);
}

.container {
	position: relative;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 150px;
  height: 150px;
}

.spinner {
  animation: rotate 2s linear infinite;
  width: 100%;
  height: 100%;
  
  & .path {
    
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
  }
  
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes dash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}