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 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.

            
              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
       
  
            
          
!
            
              @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) }
}
            
          
!
999px
Loading ..................

Console