CodePen

HTML

            
              <div class="spinner">
  <span><em></em></span>
  <span><em></em></span>
</div>

            
          
!
via HTML Inspector

CSS

            
              body {
  margin: 50px;
}
.spinner {
  width: 50px;
  height: 50px;
  background: #aaa;
  margin: 0 auto;
  position: relative;
}
.spinner:after {
  position: absolute;
  content: "";
  width: 80%;
  height: 80%;
  border-radius: 100%;
  background: #fff;
  top: 10%;
  left: 10%;
}

.spinner span em {
  background: #0e728e;
  -webkit-animation-duration: 3s; 
}

/* No need to edit below this line */

@-webkit-keyframes rotate-rt {
  0% {    -webkit-transform: rotate(0deg); }
  25% {   -webkit-transform: rotate(180deg); }
  50% {   -webkit-transform: rotate(180deg); }
  75% {   -webkit-transform: rotate(360deg); }
  100% {  -webkit-transform: rotate(360deg); }
}
@-webkit-keyframes rotate-lt {
  0% {    -webkit-transform: rotate(0deg); }
  25% {   -webkit-transform: rotate(0deg); }
  50% {   -webkit-transform: rotate(180deg); }
  75% {   -webkit-transform: rotate(180deg); }
  100% {  -webkit-transform: rotate(360deg); }
}

.spinner {
  border-radius: 100%;
  position: relative;
}

.spinner span {
  width: 50%;
  height: 100%;
  overflow: hidden;
  position: absolute;
}

.spinner span:first-child {
  left: 0;
}

.spinner span:last-child {
  left: 50%;
}

.spinner span em {
  border-radius: 999px;
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-animation-iteration-count: infinite;
  -webkit-animation-timing-function: linear;
}

.spinner span:first-child em {
  left: 100%;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  -webkit-animation-name: rotate-lt; 
  -webkit-transform-origin: 0 50%;
}

.spinner span:last-child em {
  left: -100%;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  -webkit-animation-name: rotate-rt; 
  -webkit-transform-origin: 100% 50%;
 }

            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................