cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <div class="spinner">
  <div class="ball ball-1"></div>
  <div class="ball ball-2"></div>
  <div class="ball ball-3"></div>
  <div class="ball ball-4"></div>
</div>
            
          
!
            
              .spinner {
  width: 30px;
  height: 30px;
  margin: 100px auto;
  position:relative;
}
.ball {
  height: 50px;
  width: 50px;
  left: 50%;
  top: 50%;
  background: rgba( 0, 255, 0, .5);
  border-radius: 50%;
  float: left;
  position: absolute;
}

.ball-1 {
  background: rgba( 255, 0, 0, .5);
  top: 0;
  left: 50%;
  animation: ball1 1s 0s ease infinite;
  z-index: 1;
}
.ball-2 {
  background: rgba( 0, 255, 0, .5);
  top: 50%;
  left: 100%;
  animation: ball2 1s 0s ease infinite;
  z-index: 2;
}

.ball-3 {
  background: rgba( 0, 0, 255, .5);
  top: 100%;
  left: 50%;
  animation: ball3 1s 0s ease infinite;
  z-index: 1;
}

.ball-4 {
  background: rgba( 255, 255, 0, .5);
  top: 50%;
  left: 0%;
  animation: ball4 1s 0s ease infinite;
  z-index: 2;
}

@keyframes ball1 {
  50% {
    top: -100%;
    left: 200%;
    background: rgba( 127, 127, 0, .5);
  }
  100% {
    top: 50%;
    left: 100%;
    background: rgba( 0, 255, 0, .5);
    z-index: 2;
  }
}

@keyframes ball2 {
  50% {
    top: 200%;
    left: 200%;
    background: rgba( 0, 255, 255, .5);
  }
  100% {
    top: 100%;
    left: 50%;
    background: rgba( 0, 0, 255, .5);
    z-index: 1;
  }
}

@keyframes ball3 {
  50% {
    top: 200%;
    left: -100%;
    background: rgba( 255, 0, 255, .5);
  }
  100% {
    top: 50%;
    left: 0%;
    background: rgba( 255, 255, 0, .5);
    z-index: 2;
  }
}

@keyframes ball4 {
  50% {
    top: -100%;
    left: -100%;
    background: rgba( 255, 127, 0, .5);
  }
  100% {
    top: 0%;
    left: 50%;
    background: rgba( 255, 0, 0, .5);
    z-index: 1;
  }
}
            
          
!
999px
Loading ..................

Console