Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

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.

HTML

              
                mashadinka
-for(var i = 1; i < 19; i++)
  .col(id="model-"+i)
     .card
       .f-card
         i.material-icons fingerprint
       .b-card
          i.material-icons favorite
       
  
              
            
!

CSS

              
                @import "compass";
*, *:after, *:before{
  @include box-sizing(border-box);
}
body{
  background: #F5F5F5;
  margin: 0;
  padding: 10px;
  font-family: 'Open Sans', sans-serif;
  text-align: center;
}

.col{
  display: inline-block;
  padding: 30px;
}

.card{
  width: 200px;
  height: 200px;
  margin: auto;
  position: relative;
  text-align: center;
  cursor: pointer;
  &:hover{
    z-index: 50;
  }
  
  .material-icons{
    line-height: 200px;
    font-size: 100px;
  }
  
  .f-card{
      width: 200px;
      height: 200px;
      position: absolute;
      box-shadow:0 0 0 #eee;
      left: 0;
      top: 0;
      color: #555;
      background: #fff;
      z-index: 5;
      @include transition(.3s ease-in);
  }
  .b-card{
    width: 200px;
    height: 200px;
    background: #eee;
    color: #f53249;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px #ccc inset;
    .material-icons{
      @include animation(bb 1s infinite)
    }
  }
}
// ======================================


#model-1{
  .card:hover{
      .f-card{
        box-shadow:2px 0 3px #eee;
        @include translateX(-100%);
      }
    }
}

#model-2{
  .card:hover{
      .f-card{
        box-shadow:2px 0 3px #eee;
        @include translateY(-100%);
      }
    }
}

#model-3{
  .card{
    overflow: hidden;
    &:hover{
      .f-card{
        box-shadow:0 2px 3px #eee;
        @include translateY(100%);
      }
    }
  }
}

#model-4{
  .card{
    overflow: hidden;
    &:hover{
      .f-card{
        box-shadow:2px 0 3px #eee;
        @include translateX(100%);
      }
    }
  }
}

#model-5{
  .card{
    transform-style: preserve-3d;
    .f-card{
      transform-origin: 0 0;
      @include rotateX(0deg);
    }
    &:hover{
      .f-card{
        box-shadow: 0 5px 10px #ddd;
        @include rotateX(180deg);
      }
    }
  }
}

#model-6{
  .card{
    transform-style: preserve-3d;
    .f-card{
      transform-origin: 0 0;
      @include rotateY(0deg);
    }
    &:hover{
      .f-card{
        box-shadow:5px 0 10px #eee;
        @include rotateY(180deg);
      }
    }
  }
}

#model-7{
  .card{
    transform-style: preserve-3d;
    .f-card{
      transform-origin: 0 100%;
      @include rotateX(0deg);
    }
    &:hover{
      .f-card{
        box-shadow: 0 -5px 10px #ddd;
        @include rotateX(180deg);
      }
    }
  }
}

#model-8{
  .card{
    transform-style: preserve-3d;
    .f-card{
      transform-origin: 100% 0;
      @include rotateX(0deg);
    }
    &:hover{
      .f-card{
        box-shadow: -5px 0 10px #eee;
        @include rotateY(180deg); 
      }
    }
  }
}

#model-9{
  .card{
    transform-style: preserve-3d;
    .f-card{
      transform-origin : 100% 0 0;
      @include rotate(0deg);
    }
    &:hover{
      .f-card{
        box-shadow: -5px 0 10px #eee;
        @include rotate(180deg); 
      }
    }
  }
}
#model-10{
  .card{
    transform-style: preserve-3d;
    .f-card{
      transform-origin :  100% 100% 0 ;
      @include rotate(0deg);
    }
    &:hover{
      .f-card{
        box-shadow: -5px 0 10px #eee;
        @include rotate(180deg); 
      }
    }
  }
}
#model-11{
  .card{
    perspective: 1500px;
    overflow: hidden;
    .f-card{
      transform-origin :  0 100% 0 ;
      @include rotateX(0deg);
    }
    &:hover{
      .f-card{
        box-shadow: -5px 0 10px #eee;
        @include rotateY(120deg); 
      }
    }
  }
}

#model-12{
  .card{
        perspective: 2000px;
    overflow: hidden;
    .f-card{
      transform-origin :  0 100% 0 ;
      @include rotateX(0deg);
    }
    &:hover{
      .f-card{
        box-shadow: -5px 0 10px #eee;
        @include rotateX(120deg); 
      }
    }
  }
}


#model-13{
  .card{
    .f-card{
      @include scale(1); 
    }
    &:hover{
      .f-card{
        box-shadow: none;
        @include scale(0); 
        visibility: hidden;
      }
    }
  }
}


#model-14{
  .card{
    @include rotateX(0);
    transition: .2s ease-in;
    transform-style: preserve-3d;
    transform-origin:50% 0%;

    .b-card{
        position: absolute;
        top: 100%;
        transition: .2s ease-in;
        box-shadow: none;
        left: 0;
        @include rotateX(-90deg);
        transform-origin:50% 0%;
        backface-visibility:hidden;
    }
    &:hover{
      @include rotateX(90deg);
       .b-card{
        backface-visibility:visible;
      }
    }
  }
}

#model-15{
  .card{
    @include rotateY(0);
    transition: .2s ease-in;
    transform-style: preserve-3d;
    transform-origin:0% 50%;
    .b-card{
        position: absolute;
        top: 0;
        transition: .2s ease-in;
        box-shadow: none;
        left: 100%;
        @include rotateY(-90deg);
        transform-origin:0 50%;
        backface-visibility:hidden;
    }
    &:hover{
      @include rotateY(90deg);
      .b-card{
        backface-visibility:visible;
      }
    }
  }
}

#model-16{
  .card{
    @include rotateY(0deg);
    transition: .2s ease-in;
    .f-card{
      backface-visibility:visible;
      z-index: auto;
    }
    .b-card{
        position: absolute;
        top: 0;
        box-shadow: none;
        z-index: auto;
        left: 0;
        @include rotateY(180deg);
         backface-visibility:hidden;
        visibility:hidden;
    }
    &:hover{
      .f-card{
        backface-visibility:hidden;
      }  
      .b-card{
        backface-visibility:visible;
        visibility:visible;
      }  
      @include rotateY(180deg);
    }
  }
}

#model-17{
  .card{
    @include rotateX(0deg);
    transition: .2s ease-in;
    .f-card{
      backface-visibility:visible;
      z-index: auto;
    }
    .b-card{
        position: absolute;
        top: 0;
        box-shadow: none;
        z-index: auto;
        left: 0;
        @include rotateX(180deg);
         backface-visibility:hidden;
        visibility:hidden;
    }
    &:hover{
      .f-card{
        backface-visibility:hidden;
      }  
      .b-card{
        backface-visibility:visible;
        visibility:visible;
      }  
      @include rotateX(180deg);
    }
  }
}

#model-18{
  .card:hover{
      .f-card{
        opacity: 0;
      }  
  }
}


@include keyframes(bb){
  0% , 100% { @include scale(0.85) }
  50% { @include scale(1) }
}
              
            
!

JS

              
                
              
            
!
999px

Console