css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div id="header">
  <h3>Pokéball Loader</h3>
  <p>in pure CSS</p>
</div>
<div id="loading">
  <div class="pokeball" id="normal"></div>
  <div class="pokeball" id="great"></div>
  <div class="pokeball" id="ultra"></div>
  <div class="pokeball" id="master"></div>
  <div class="pokeball" id="safari"></div>
</div>
            
          
!
            
              @import 'https://fonts.googleapis.com/css?family=Reem+Kufi';
$red: #e20f07;
$blu: #278de1;
$ylw: #ffff00;
$ppl: #481a66;
$pnk: #eb23aa;
$brw: #9a4a01;
$mos: #606700;
$grn: #5fa300;
$blk: #000;
$wht: #FFF;
$gry: #a5a5a5;
@keyframes rotateBall {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@-webkit-keyframes rotateBall {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(50deg);
  }
  0% {
    transform: rotate(360deg);
  }
}
html, body {
  margin: 0;
  height: 100%;
  width: 100%;
}
body {
  background: mix(lighten($blu, 23%), lighten($ylw, 30%), 30%);
  color: $mos;
}
#header {
  font-family: 'Reem Kufi', sans-serif;
  position: absolute;
  top: 2em;
  text-align: center;
  width: 100%;
  * {
    margin: 0;
  }
}
#loading {
  height: 48px;
  width: 264px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
}
.pokeball {
  width: 4px;
  height: 4px;
  transform-origin: 24px 24px;
  animation: rotateBall 1.5s infinite forwards;
  &#normal {
    box-shadow: 
      //Row: 1
      16px 0 0 $blk, 20px 0 0 $blk, 24px 0 0 $blk, 28px 0 0 $blk,
      //Row: 2
      8px 4px 0 $blk, 12px 4px 0 $blk, 16px 4px 0 $red, 20px 4px 0 $red, 24px 4px 0 $red, 28px 4px 0 $red, 32px 4px 0 $blk, 36px 4px 0 $blk,
      //Row: 3
      4px 8px 0 $blk, 8px 8px 0 $red, 12px 8px 0 $red, 16px 8px 0 $wht, 20px 8px 0 $red, 24px 8px 0 $red, 28px 8px 0 $red, 32px 8px 0 $red, 36px 8px 0 $red, 40px 8px 0 $blk, 
      //Row: 4
      4px 12px 0 $blk, 8px 12px 0 $red, 12px 12px 0 $wht, 16px 12px 0 $wht, 20px 12px 0 $wht, 24px 12px 0 $red, 28px 12px 0 $red, 32px 12px 0 $red, 36px 12px 0 $red, 40px 12px 0 $blk,
      //Row: 5
      0px 16px 0 $blk, 4px 16px 0 $red, 8px 16px 0 $red, 12px 16px 0 $red, 16px 16px 0 $wht, 20px 16px 0 $red, 24px 16px 0 $red, 28px 16px 0 $red, 32px 16px 0 $red, 36px 16px 0 $red, 40px 16px 0 $red, 44px 16px 0 $blk,
      //Row: 6
      0px 20px 0 $blk, 4px 20px 0 $red, 8px 20px 0 $red, 12px 20px 0 $red, 16px 20px 0 $red, 20px 20px 0 $blk, 24px 20px 0 $blk, 28px 20px 0 $red, 32px 20px 0 $red, 36px 20px 0 $red, 40px 20px 0 $red, 44px 20px 0 $blk, 
      //Row: 7
      0px 24px 0 $blk, 4px 24px 0 $blk, 8px 24px 0 $red, 12px 24px 0 $red, 16px 24px 0 $blk, 20px 24px 0 $wht, 24px 24px 0 $gry, 28px 24px 0 $blk, 32px 24px 0 $red, 36px 24px 0 $red, 40px 24px 0 $blk, 44px 24px 0 $blk, 
      //Row: 8
      0px 28px 0 $blk, 4px 28px 0 $wht, 8px 28px 0 $blk, 12px 28px 0 $blk, 16px 28px 0 $blk, 20px 28px 0 $gry, 24px 28px 0 $gry, 28px 28px 0 $blk, 32px 28px 0 $blk, 36px 28px 0 $blk, 40px 28px 0 $gry, 44px 28px 0 $blk,
      //Row: 9
      4px 32px 0 $blk, 8px 32px 0 $wht, 12px 32px 0 $wht, 16px 32px 0 $wht, 20px 32px 0 $blk, 24px 32px 0 $blk, 28px 32px 0 $gry, 32px 32px 0 $gry, 36px 32px 0 $gry, 40px 32px 0 $blk,
      //Row: 10
      4px 36px 0 $blk, 8px 36px 0 $gry, 12px 36px 0 $wht, 16px 36px 0 $wht, 20px 36px 0 $wht, 24px 36px 0 $gry, 28px 36px 0 $gry, 32px 36px 0 $gry, 36px 36px 0 $gry, 40px 36px 0 $blk,
      //Row: 11
      8px 40px 0 $blk, 12px 40px 0 $blk, 16px 40px 0 $gry, 20px 40px 0 $gry, 24px 40px 0 $gry, 28px 40px 0 $gry, 32px 40px 0 $blk, 36px 40px 0 $blk,
      //Row: 12
      16px 44px 0 $blk, 20px 44px 0 $blk, 24px 44px 0 $blk, 28px 44px 0 $blk
      ;
  }
  &#great {
    animation-delay: 0.25s;
    margin: -4px 0 0 54px;
    box-shadow: 
      //Row: 1
      16px 0 0 $blk, 20px 0 0 $blk, 24px 0 0 $blk, 28px 0 0 $blk,
      //Row: 2
      8px 4px 0 $blk, 12px 4px 0 $blk, 16px 4px 0 $blu, 20px 4px 0 $blu, 24px 4px 0 $blu, 28px 4px 0 $blu, 32px 4px 0 $blk, 36px 4px 0 $blk,
      //Row: 3
      4px 8px 0 $blk, 8px 8px 0 $red, 12px 8px 0 $red, 16px 8px 0 $blu, 20px 8px 0 $blu, 24px 8px 0 $blu, 28px 8px 0 $blu, 32px 8px 0 $red, 36px 8px 0 $red, 40px 8px 0 $blk, 
      //Row: 4
      4px 12px 0 $blk, 8px 12px 0 $red, 12px 12px 0 $red, 16px 12px 0 $red, 20px 12px 0 $blu, 24px 12px 0 $blu, 28px 12px 0 $red, 32px 12px 0 $red, 36px 12px 0 $red, 40px 12px 0 $blk,
      //Row: 5
      0px 16px 0 $blk, 4px 16px 0 $blu, 8px 16px 0 $blu, 12px 16px 0 $red, 16px 16px 0 $red, 20px 16px 0 $blu, 24px 16px 0 $blu, 28px 16px 0 $red, 32px 16px 0 $red, 36px 16px 0 $blu, 40px 16px 0 $blu, 44px 16px 0 $blk,
      //Row: 6
      0px 20px 0 $blk, 4px 20px 0 $blu, 8px 20px 0 $blu, 12px 20px 0 $blu, 16px 20px 0 $blu, 20px 20px 0 $blk, 24px 20px 0 $blk, 28px 20px 0 $blu, 32px 20px 0 $blu, 36px 20px 0 $blu, 40px 20px 0 $blu, 44px 20px 0 $blk, 
      //Row: 7
      0px 24px 0 $blk, 4px 24px 0 $blk, 8px 24px 0 $blu, 12px 24px 0 $blu, 16px 24px 0 $blk, 20px 24px 0 $wht, 24px 24px 0 $gry, 28px 24px 0 $blk, 32px 24px 0 $blu, 36px 24px 0 $blu, 40px 24px 0 $blk, 44px 24px 0 $blk, 
      //Row: 8
      0px 28px 0 $blk, 4px 28px 0 $wht, 8px 28px 0 $blk, 12px 28px 0 $blk, 16px 28px 0 $blk, 20px 28px 0 $gry, 24px 28px 0 $gry, 28px 28px 0 $blk, 32px 28px 0 $blk, 36px 28px 0 $blk, 40px 28px 0 $gry, 44px 28px 0 $blk,
      //Row: 9
      4px 32px 0 $blk, 8px 32px 0 $wht, 12px 32px 0 $wht, 16px 32px 0 $wht, 20px 32px 0 $blk, 24px 32px 0 $blk, 28px 32px 0 $gry, 32px 32px 0 $gry, 36px 32px 0 $gry, 40px 32px 0 $blk,
      //Row: 10
      4px 36px 0 $blk, 8px 36px 0 $gry, 12px 36px 0 $wht, 16px 36px 0 $wht, 20px 36px 0 $wht, 24px 36px 0 $gry, 28px 36px 0 $gry, 32px 36px 0 $gry, 36px 36px 0 $gry, 40px 36px 0 $blk,
      //Row: 11
      8px 40px 0 $blk, 12px 40px 0 $blk, 16px 40px 0 $gry, 20px 40px 0 $gry, 24px 40px 0 $gry, 28px 40px 0 $gry, 32px 40px 0 $blk, 36px 40px 0 $blk,
      //Row: 12
      16px 44px 0 $blk, 20px 44px 0 $blk, 24px 44px 0 $blk, 28px 44px 0 $blk
      ;
  }
  &#ultra {
    animation-delay: 0.5s;
    margin: -4px 0 0 108px;
    box-shadow: 
      //Row: 1
      16px 0 0 $blk, 20px 0 0 $blk, 24px 0 0 $blk, 28px 0 0 $blk,
      //Row: 2
      8px 4px 0 $blk, 12px 4px 0 $blk, 16px 4px 0 $ylw, 20px 4px 0 $ylw, 24px 4px 0 $ylw, 28px 4px 0 $ylw, 32px 4px 0 $blk, 36px 4px 0 $blk,
      //Row: 3
      4px 8px 0 $blk, 8px 8px 0 $ylw, 12px 8px 0 $ylw, 16px 8px 0 $ylw, 20px 8px 0 $ylw, 24px 8px 0 $ylw, 28px 8px 0 $ylw, 32px 8px 0 $ylw, 36px 8px 0 $ylw, 40px 8px 0 $blk, 
      //Row: 4
      4px 12px 0 $blk, 8px 12px 0 $ylw, 12px 12px 0 $ylw, 16px 12px 0 $blk, 20px 12px 0 $blk, 24px 12px 0 $blk, 28px 12px 0 $blk, 32px 12px 0 $ylw, 36px 12px 0 $ylw, 40px 12px 0 $blk,
      //Row: 5
      0px 16px 0 $blk, 4px 16px 0 $blk, 8px 16px 0 $ylw, 12px 16px 0 $ylw, 16px 16px 0 $blk, 20px 16px 0 $blk, 24px 16px 0 $blk, 28px 16px 0 $blk, 32px 16px 0 $ylw, 36px 16px 0 $ylw, 40px 16px 0 $blk, 44px 16px 0 $blk,
      //Row: 6
      0px 20px 0 $blk, 4px 20px 0 $blk, 8px 20px 0 $blk, 12px 20px 0 $blk, 16px 20px 0 $blk, 20px 20px 0 $blk, 24px 20px 0 $blk, 28px 20px 0 $blk, 32px 20px 0 $blk, 36px 20px 0 $blk, 40px 20px 0 $blk, 44px 20px 0 $blk, 
      //Row: 7
      0px 24px 0 $blk, 4px 24px 0 $blk, 8px 24px 0 $blk, 12px 24px 0 $blk, 16px 24px 0 $blk, 20px 24px 0 $wht, 24px 24px 0 $gry, 28px 24px 0 $blk, 32px 24px 0 $blk, 36px 24px 0 $blk, 40px 24px 0 $blk, 44px 24px 0 $blk, 
      //Row: 8
      0px 28px 0 $blk, 4px 28px 0 $wht, 8px 28px 0 $blk, 12px 28px 0 $blk, 16px 28px 0 $blk, 20px 28px 0 $gry, 24px 28px 0 $gry, 28px 28px 0 $blk, 32px 28px 0 $blk, 36px 28px 0 $blk, 40px 28px 0 $gry, 44px 28px 0 $blk,
      //Row: 9
      4px 32px 0 $blk, 8px 32px 0 $wht, 12px 32px 0 $wht, 16px 32px 0 $wht, 20px 32px 0 $blk, 24px 32px 0 $blk, 28px 32px 0 $gry, 32px 32px 0 $gry, 36px 32px 0 $gry, 40px 32px 0 $blk,
      //Row: 10
      4px 36px 0 $blk, 8px 36px 0 $gry, 12px 36px 0 $wht, 16px 36px 0 $wht, 20px 36px 0 $wht, 24px 36px 0 $gry, 28px 36px 0 $gry, 32px 36px 0 $gry, 36px 36px 0 $gry, 40px 36px 0 $blk,
      //Row: 11
      8px 40px 0 $blk, 12px 40px 0 $blk, 16px 40px 0 $gry, 20px 40px 0 $gry, 24px 40px 0 $gry, 28px 40px 0 $gry, 32px 40px 0 $blk, 36px 40px 0 $blk,
      //Row: 12
      16px 44px 0 $blk, 20px 44px 0 $blk, 24px 44px 0 $blk, 28px 44px 0 $blk
      ;
  }
  &#master {
    animation-delay: 0.75s;
    margin: -4px 0 0 162px;
    box-shadow: 
      //Row: 1
      16px 0 0 $blk, 20px 0 0 $blk, 24px 0 0 $blk, 28px 0 0 $blk,
      //Row: 2
      8px 4px 0 $blk, 12px 4px 0 $blk, 16px 4px 0 $ppl, 20px 4px 0 $ppl, 24px 4px 0 $ppl, 28px 4px 0 $ppl, 32px 4px 0 $blk, 36px 4px 0 $blk,
      //Row: 3
      4px 8px 0 $blk, 8px 8px 0 $pnk, 12px 8px 0 $pnk, 16px 8px 0 $ppl, 20px 8px 0 $ppl, 24px 8px 0 $ppl, 28px 8px 0 $ppl, 32px 8px 0 $pnk, 36px 8px 0 $pnk, 40px 8px 0 $blk, 
      //Row: 4
      4px 12px 0 $blk, 8px 12px 0 $pnk, 12px 12px 0 $wht, 16px 12px 0 $wht, 20px 12px 0 $ppl, 24px 12px 0 $ppl, 28px 12px 0 $wht, 32px 12px 0 $wht, 36px 12px 0 $pnk, 40px 12px 0 $blk,
      //Row: 5
      0px 16px 0 $blk, 4px 16px 0 $ppl, 8px 16px 0 $ppl, 12px 16px 0 $wht, 16px 16px 0 $ppl, 20px 16px 0 $wht, 24px 16px 0 $wht, 28px 16px 0 $ppl, 32px 16px 0 $wht, 36px 16px 0 $ppl, 40px 16px 0 $ppl, 44px 16px 0 $blk,
      //Row: 6
      0px 20px 0 $blk, 4px 20px 0 $ppl, 8px 20px 0 $ppl, 12px 20px 0 $ppl, 16px 20px 0 $ppl, 20px 20px 0 $blk, 24px 20px 0 $blk, 28px 20px 0 $ppl, 32px 20px 0 $ppl, 36px 20px 0 $ppl, 40px 20px 0 $ppl, 44px 20px 0 $blk, 
      //Row: 7
      0px 24px 0 $blk, 4px 24px 0 $blk, 8px 24px 0 $ppl, 12px 24px 0 $ppl, 16px 24px 0 $blk, 20px 24px 0 $wht, 24px 24px 0 $gry, 28px 24px 0 $blk, 32px 24px 0 $ppl, 36px 24px 0 $ppl, 40px 24px 0 $blk, 44px 24px 0 $blk, 
      //Row: 8
      0px 28px 0 $blk, 4px 28px 0 $wht, 8px 28px 0 $blk, 12px 28px 0 $blk, 16px 28px 0 $blk, 20px 28px 0 $gry, 24px 28px 0 $gry, 28px 28px 0 $blk, 32px 28px 0 $blk, 36px 28px 0 $blk, 40px 28px 0 $gry, 44px 28px 0 $blk,
      //Row: 9
      4px 32px 0 $blk, 8px 32px 0 $wht, 12px 32px 0 $wht, 16px 32px 0 $wht, 20px 32px 0 $blk, 24px 32px 0 $blk, 28px 32px 0 $gry, 32px 32px 0 $gry, 36px 32px 0 $gry, 40px 32px 0 $blk,
      //Row: 10
      4px 36px 0 $blk, 8px 36px 0 $gry, 12px 36px 0 $wht, 16px 36px 0 $wht, 20px 36px 0 $wht, 24px 36px 0 $gry, 28px 36px 0 $gry, 32px 36px 0 $gry, 36px 36px 0 $gry, 40px 36px 0 $blk,
      //Row: 11
      8px 40px 0 $blk, 12px 40px 0 $blk, 16px 40px 0 $gry, 20px 40px 0 $gry, 24px 40px 0 $gry, 28px 40px 0 $gry, 32px 40px 0 $blk, 36px 40px 0 $blk,
      //Row: 12
      16px 44px 0 $blk, 20px 44px 0 $blk, 24px 44px 0 $blk, 28px 44px 0 $blk
      ;
  }
  &#safari {
    animation-delay: 1s;
    margin: -4px 0 0 216px;
    box-shadow: 
      //Row: 1
      16px 0 0 $blk, 20px 0 0 $blk, 24px 0 0 $blk, 28px 0 0 $blk,
      //Row: 2
      8px 4px 0 $blk, 12px 4px 0 $blk, 16px 4px 0 $brw, 20px 4px 0 $brw, 24px 4px 0 $mos, 28px 4px 0 $grn, 32px 4px 0 $blk, 36px 4px 0 $blk,
      //Row: 3
      4px 8px 0 $blk, 8px 8px 0 $mos, 12px 8px 0 $mos, 16px 8px 0 $mos, 20px 8px 0 $brw, 24px 8px 0 $brw, 28px 8px 0 $grn, 32px 8px 0 $mos, 36px 8px 0 $brw, 40px 8px 0 $blk, 
      //Row: 4
      4px 12px 0 $blk, 8px 12px 0 $brw, 12px 12px 0 $brw, 16px 12px 0 $brw, 20px 12px 0 $brw, 24px 12px 0 $brw, 28px 12px 0 $grn, 32px 12px 0 $mos, 36px 12px 0 $mos, 40px 12px 0 $blk,
      //Row: 5
      0px 16px 0 $blk, 4px 16px 0 $grn, 8px 16px 0 $mos, 12px 16px 0 $grn, 16px 16px 0 $grn, 20px 16px 0 $mos, 24px 16px 0 $mos, 28px 16px 0 $mos, 32px 16px 0 $grn, 36px 16px 0 $brw, 40px 16px 0 $brw, 44px 16px 0 $blk,
      //Row: 6
      0px 20px 0 $blk, 4px 20px 0 $grn, 8px 20px 0 $mos, 12px 20px 0 $grn, 16px 20px 0 $mos, 20px 20px 0 $blk, 24px 20px 0 $blk, 28px 20px 0 $mos, 32px 20px 0 $mos, 36px 20px 0 $grn, 40px 20px 0 $grn, 44px 20px 0 $blk, 
      //Row: 7
      0px 24px 0 $blk, 4px 24px 0 $blk, 8px 24px 0 $mos, 12px 24px 0 $mos, 16px 24px 0 $blk, 20px 24px 0 $wht, 24px 24px 0 $gry, 28px 24px 0 $blk, 32px 24px 0 $brw, 36px 24px 0 $brw, 40px 24px 0 $blk, 44px 24px 0 $blk, 
      //Row: 8
      0px 28px 0 $blk, 4px 28px 0 $wht, 8px 28px 0 $blk, 12px 28px 0 $blk, 16px 28px 0 $blk, 20px 28px 0 $gry, 24px 28px 0 $gry, 28px 28px 0 $blk, 32px 28px 0 $blk, 36px 28px 0 $blk, 40px 28px 0 $gry, 44px 28px 0 $blk,
      //Row: 9
      4px 32px 0 $blk, 8px 32px 0 $wht, 12px 32px 0 $wht, 16px 32px 0 $wht, 20px 32px 0 $blk, 24px 32px 0 $blk, 28px 32px 0 $gry, 32px 32px 0 $gry, 36px 32px 0 $gry, 40px 32px 0 $blk,
      //Row: 10
      4px 36px 0 $blk, 8px 36px 0 $gry, 12px 36px 0 $wht, 16px 36px 0 $wht, 20px 36px 0 $wht, 24px 36px 0 $gry, 28px 36px 0 $gry, 32px 36px 0 $gry, 36px 36px 0 $gry, 40px 36px 0 $blk,
      //Row: 11
      8px 40px 0 $blk, 12px 40px 0 $blk, 16px 40px 0 $gry, 20px 40px 0 $gry, 24px 40px 0 $gry, 28px 40px 0 $gry, 32px 40px 0 $blk, 36px 40px 0 $blk,
      //Row: 12
      16px 44px 0 $blk, 20px 44px 0 $blk, 24px 44px 0 $blk, 28px 44px 0 $blk
      ;
  }
}

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console