cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmloctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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="loader">
  <div class="heart"></div>
  <div class="heart"></div>
  <div class="heart"></div>
</div>
            
          
!
            
              *, *:before, *:after {
  box-sizing: border-box;
}

.loader {
  width: 50px;
  height: 24px;
  padding: 4px 0;
  background: #222;
  border-top: 2px solid #111;
  border-bottom: 2px solid #111;
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(2);
  // scaling it for a better view
  
  &::before,
  &::after {
    content: '';
    position: absolute;
    top: 0;
    height: 2px;
    width: 2px;
  }
  
  &::before {
    box-shadow: //left border
                -2px  0px 0 #111,
                -4px  2px 0 #111,
                -6px  4px 0 #111,
                -6px  6px 0 #111,
                -6px  8px 0 #111,
                -6px 10px 0 #111,
                -6px 12px 0 #111,
                -6px 14px 0 #111,
                -4px 16px 0 #111,
                -2px 18px 0 #111,
                //left lg vertical line
                -2px  2px 0 #222,
                -2px  4px 0 #222,
                -2px  6px 0 #222,
                -2px  8px 0 #222,
                -2px 10px 0 #222,
                -2px 12px 0 #222,
                -2px 14px 0 #222,
                -2px 16px 0 #222,
                //left md vertical line
                -4px  4px 0 #222,
                -4px  6px 0 #222,
                -4px  8px 0 #222,
                -4px 10px 0 #222,
                -4px 12px 0 #222,
                -4px 14px 0 #222;    
  }
  
  &::after {
    right: 0;
    box-shadow: //left border
                2px  0px 0 #111,
                4px  2px 0 #111,
                6px  4px 0 #111,
                6px  6px 0 #111,
                6px  8px 0 #111,
                6px 10px 0 #111,
                6px 12px 0 #111,
                6px 14px 0 #111,
                4px 16px 0 #111,
                2px 18px 0 #111,
                //left lg vertical line
                2px  2px 0 #222,
                2px  4px 0 #222,
                2px  6px 0 #222,
                2px  8px 0 #222,
                2px 10px 0 #222,
                2px 12px 0 #222,
                2px 14px 0 #222,
                2px 16px 0 #222,
                //left md vertical line
                4px  4px 0 #222,
                4px  6px 0 #222,
                4px  8px 0 #222,
                4px 10px 0 #222,
                4px 12px 0 #222,
                4px 14px 0 #222; 
  }  
}

.heart {
    display: inline-block;
    vertical-align: top;
    margin-left: 12px;
    height: 2px;
    width: 2px;
    box-shadow: 
      6px  2px 0 #fff,
      //
      2px  0px 0 #fff,
      4px  0px 0 #fff,
      0px  2px 0 #fff,
      0px  4px 0 #fff,
      2px  6px 0 #fff,
      4px  8px 0 #fff,
      6px  10px 0 #fff,
      //
      8px  0px 0 #fff,
      10px  0px 0 #fff,
      12px  2px 0 #fff,
      12px  4px 0 #fff,
      10px  6px 0 #fff,
      8px  8px 0 #fff;
  
  &::before,
  &::after {
    content: '';
    position: absolute;
    height: 2px; width: 2px;
    visibility: hidden;
    animation: ani 3s/*duration*/ 2s/*delay*/  infinite;
  }
  
  &::before {
    box-shadow: 
      2px  2px 0 #e03800,
      2px  4px 0 #e03800,
      4px  2px 0 #e03800,
      4px  4px 0 #e03800,
      4px  6px 0 #e03800,
      6px  4px 0 #e03800,
      6px  6px 0 #e03800,
      6px  8px 0 #e03800;  
  }
  
  &::after {
    box-shadow: 
      8px  2px 0 #e03800,
      8px  4px 0 #e03800,
      8px  6px 0 #e03800,
      10px  2px 0 #e03800,
      10px  4px 0 #e03800;
  }   
  
  &:nth-child(1) {
    margin: 0;
    &::before {
      animation-timing-function: steps(9);
    }
    &::after {
      animation-timing-function: steps(8);
    }     
  }
  
  &:nth-child(2) {
    &::before {
       animation-timing-function: steps(7);
    }
    &::after {
        animation-timing-function: steps(6);
    }     
  }
  
  &:nth-child(3) {
    &::before {
       animation-timing-function: steps(5);
    }
    &::after {
       animation-timing-function: steps(4);
    }     
  }
  
}

@keyframes ani {
  to {visibility: visible;} 
} 
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console