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.

            
              %p.link
  Based on
  %a(href = 'http://drbl.in/mPeZ')this dribbble shot
  by
  %a(href='https://dribbble.com/acolli')Alex Collins

- @n = 3
.container
  - @n.times do
    %i.layer
            
          
!
            
              $duration:  1.8s;
$dimension: 3em;

/**
 * Create the loop delay with
 * the extra keyframes
 */
@keyframes moveup {
  0%, 60%, 100% {
    transform: 
      rotateX(50deg)
      rotateY(0deg)
      rotateZ(45deg)
      translateZ(0);
  }
  25% {
    transform:
      rotateX(50deg)
      rotateY(0deg)
      rotateZ(45deg)
      translateZ(1em);
  }
}

@keyframes movedown {
  0%, 60%, 100% {
    transform: 
      rotateX(50deg)
      rotateY(0deg)
      rotateZ(45deg)
      translateZ(0);
  }
  25% {
    transform:
      rotateX(50deg)
      rotateY(0deg)
      rotateZ(45deg)
      translateZ(-1em);
  }
}

/**
 * Square layer styles
 */
.layer {
  display: block;
  position: absolute;
  height: $dimension;
  width: $dimension;
  
  box-shadow: 3px 3px 2px rgba(0,0,0,.2);
  
  transform:
    rotateX(50deg)
    rotateY(0deg)
    rotateZ(45deg);
  
  &:nth-of-type(1) {
    background: #534a47;
    margin-top: $dimension/2;
    animation: movedown $duration cubic-bezier(0.39, 0.575, 0.565, 1) $duration/2 infinite normal;
    &:before {
      content: '';
      position: absolute;
      width: 85%;
      height: 85%;
      background: #37332f;
    }
  }
  
  &:nth-of-type(2) {
    background: #5a96bc;
    margin-top: $dimension/4;
  }
  
  &:nth-of-type(3) {
    background: rgba(255,255,255,.6);
    animation: moveup $duration cubic-bezier(0.39, 0.575, 0.565, 1) infinite normal;
  }
  
}


/* Stage and link styles */

body { background: #1c2336; }

.container {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.link {
  position: absolute;
  top: 30%; left: 50%;
  
  color: rgba(255,255,255,.5);
  font: 400 1em Helvetica Neue, Helvetica, sans-serif;
  
  transform: translate(-50%, -50%);
  
  a {
    color: #ea4c89;
    text-decoration: none;
  }
}
            
          
!
999px
Loading ..................

Console