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

              
                .stat
  -(1..1).each do |i|
    %input{:type => 'checkbox', :id => "#{i}",:name => 'box'}
      %label{:for => "#{i}",:name => 'box'}
        .stat_inner
          .stat_inner__innerbox
            .front
              -(1..25).each do
                .bar
              .icon
                %i.icon.ion-card
            .back
            .top
            .bottom
            .left
            .right
              .details
                %h2 Click for more
          .stat_inner__outerbox--bottom
            .front
            .back
            .top
            .bottom
            .left
            .right
          .stat_inner__outerbox--top
            .front
            .back
            .top
            .bottom
            .left
              .title
                %i.icon.ion-card
              
            .right
              %i.icon.ion-card
              %h2 Todays sales
              %h3 £13,000
              %i.icon.ion-chevron-down

              
            
!

CSS

              
                $p: 800px;
$h: 100vh;
$iw: 100px;
$ih: 380px;
$o: 12px;
$obh:$ih/4;
$oprim:#E0E0E0;
$iprim:#70FFC5;
$m: $ih/4;
$t: .65s;
$d: .1s;
$e: cubic-bezier(0.190, 1.000, 0.220, 1.000);
$a: 4s;
$ao: 10px;
$wireframe: false;
$font:nunito, sans-serif;

@import url(https://fonts.googleapis.com/css?family=Nunito:400,700,300);

%pos_abs{
  position:absolute;
  right:0;
  left:0;
  top:50%;
  margin:auto;
}

*{
  box-sizing:border-box;
}
body{
  background: -webkit-radial-gradient(center, ellipse cover, #2A96AF 0%, #2A96AF 100%);
  //background: -moz-radial-gradient(center, ellipse cover, #2A96AF 0%, #2A96AF 100%);
  overflow:hidden;
}

.stat{  animation:in .6s forwards,float $a .6s infinite;
  perspective:$p;
  opacity:0;
  height:$h;
  input[type="checkbox"]{display:none;}
  input[type="checkbox"]:checked + label .stat_inner{
    transform: translateY(-50%) rotatey(0deg) rotatez(90deg)  scale(1) translateZ(0px);
    z-index:5;
  }
  input[type="checkbox"]:checked + label .stat_inner__outerbox--top{
    transform:translateY(-1000px);

  }
  input[type="checkbox"]:checked + label .stat_inner__innerbox .front{
    box-shadow: 0px 0px rgba(0, 0, 0, 0.05) inset;

  }
  input[type="checkbox"]:checked + label .stat_inner__innerbox .bar{
    box-shadow: 110px 0px white inset;
  }
  input[type="checkbox"]:checked + label .stat_inner__innerbox i{
    transform: rotate(-90deg) scale(1);
  }
  input[type="checkbox"]:checked + label .stat_inner__innerbox .right{
    box-shadow: 0px 0px rgba(0, 0, 0, 0.05) inset;
    transform: rotateY(-270deg) translateX($iw/2) translatez(10px);
    background:#228AA2;
    h1,h2,h3{
      display:none
    }

  }
  input[type="checkbox"]:checked + label .stat_inner__outerbox--bottom{
    transform:translateY(1000px);

  }

  &_inner{
    @extend %pos_abs !optional;
    transform-style:preserve-3d;
    width:$iw;
    height:$ih;
    transform: translateY(-50%) rotatey(50deg)  scale(.8) translateZ(0px);
    cursor:pointer;
    transition: all $t $d $e;
    .ion-chevron-down{
      transition:all .2s .4s;
      position:relative;
      opacity:0;
      top:-20px;
    }
    &:hover{
      transform: translateY(-50%) scale(1) rotatey(-50deg) translateZ(0);
      .stat_inner__outerbox--top{
        transform:translateY(-$m);
          //animation:float $a ($t + $d) infinite;
          }.stat_inner__innerbox{

      }
      .ion-chevron-down{
        position:relative;
        top:0px;
        opacity:1;
        
      }
    }
    &__innerbox{
      position: relative;
      width: $iw;
      transform-style: preserve-3d;
      div{
        position: absolute;
        width: $iw;
        height: $ih;
        @if($wireframe == true){
          background:transparent !important;
          border:1px solid black;
        } 
      }
      .back {
        transform: translateZ(-$iw/2) rotateY(180deg);
          background:$iprim;
          }
      .right {
        transform: rotateY(-270deg) translateX($iw/2);
        transform-origin: top right; transition:all $t $d $e;
        background:$iprim; box-shadow: 0px 190px rgba(0, 0, 0, 0.05) inset;
        .details{
          position: absolute;
          top: 47%;
          text-align: center;
          height: 0px;
          transform: translateY(-50%);
          h2{
            font-family: nunito, sans-serif;
            color: #49C593;
            font-size: 17px;
            padding-top: 12px;
          }
        }
      }
      .left {
        transform: rotateY(270deg) translateX(-$iw/2);
          transform-origin: center left;   
          background:$iprim;

          }
      .top {
        transform: rotateX(-90deg) translateY(-$iw/2);
          transform-origin: top center;
          height: $iw;
          background:$iprim;    
          }
      .bottom {
        transform: rotateX(90deg) translateY($iw/2) translatez(-$ih + $iw);
          transform-origin: bottom center;
          height: $iw;
          background:$iprim;
          }
      .front {
        transition:all $t $d $e;
        transform: translateZ($iw/2);    box-shadow: 0px 190px rgba(0, 0, 0, 0.05) inset;
        background:lighten($iprim,10%);
        text-align:center;
        h3{
          font-family: nunito, sans-serif;
          color: #49C593;
          font-size: 17px;
          margin:0;
          padding-top: 12px;
        }
        h4{
          font-family: nunito, sans-serif;
          color: #49C593;
          margin:0;
          font-size: 17px;
          padding-top: 12px;
        }
        i{
          position: absolute;
          bottom: 20px;
          
          background: #72D2AB;
          padding: 17px 10px 22px 12px;
          width: 60px;
          height: 60px;
          line-height: 22px;
          left: 21px;
          border-radius: 100px;
          color: white;
          font-size: 29px;
          transition:all .2s 1s $e;transform: rotate(-90deg) scale(0);

        }
        .bar{
          &:hover{

          }
          height: 5px;
          z-index:2;
          float: left;
          border-radius: 100px;
          position: relative;
          margin: 6px 3px 0px -4px;   box-shadow: 0px 0px #fff inset;
          transform: rotatey(180deg) rotatex(180deg) translatex(-100px);
          transform-origin: 0% 50%;
          background: #90F5CD;

          clear: both;
          @for $i from 1 through 25{
            &:nth-of-type(#{$i}){
              width:random(20) + 50 + 0%;
              transition:all .2s ($i/40 + .3s);
            }
          }
        }
      }
    }
    &__outerbox--bottom{
      position: relative;
      width: $iw;transform:translateY(0px);
      transform-style: preserve-3d;transition: all $t $d $e;
      div{
        position: absolute;
        width: $iw + ($o * 2);
        height: $obh + ($o * 2);
        @if($wireframe == true){
          background:transparent !important;
          border:1px solid black;
        } 
      }
      .back {
        transform: translateZ(-($iw/2) - $o ) rotateY(180deg) translateY(-$o + $ih - $obh)  translateX($o);
          }
      .right {
        transform: rotateY(-270deg) translateX(($iw/2) + $o - 2) translateY(-$o + $ih - $obh - 1) translateZ(-$o);
          transform-origin: top right;background:lighten($oprim,4%);

          }
      .left {
        transform: rotateY(270deg) translateX(-($iw/2) - $o) translateY(-$o + $ih - $obh - 1) translateZ($o);
          transform-origin: center left;
          background:lighten($oprim,4%)
          }
      .top {
        transform: rotateX(-90deg) translateY((-($iw/2) - $o) ) translateZ(-$o + $ih - $obh) translateX(-$o);
          transform-origin: top center;
          height: $iw + ($o * 2);
          background:$oprim
          }
      .bottom {
        transform: rotateX(90deg) translateY($iw/2 + $o - 1) translatez((-$ih + $iw) + $o - 21) translateX(-$o - 1);
          transform-origin: bottom center;
          height: $iw + ($o * 2); 
          background: #228AA2;
          // box-shadow: 0px 10px 206px 40px #1E2842;
          }

      .front {
        transform: translateZ(($iw/2) + $o) translateY(-$o + $ih - $obh - 1 ) translateX(-$o - 1);
          background:lighten($oprim,10%);
          }

    }
    &__outerbox--top{
      position: relative;
      width: $iw;
      transform:translateY(0px);
      transform-style: preserve-3d;
      transition: all $t $d $e;
      div{
        position: absolute;
        width: $iw + ($o * 2);
        height: $obh * 3;
        @if($wireframe == true){
          background:transparent !important;
          border:1px solid black;
        } 
      }
      .back {
        transform: translateZ(-($iw/2) - $o ) rotateY(180deg) translateY(-$o)  translateX($o);
          }
      .right {
        transform: rotateY(-270deg) translateX(($iw/2) + $o - 2) translateY(-$o ) translateZ(-$o);
          transform-origin: top right;background:lighten($oprim,4%);
          font-family: nunito, sans-serif;
          color: #49C593;
          font-size: 13px;
          text-align:center;
          // transform-style: preserve-3d;
          h2,h3{
            padding:0px 20px;
            text-orientation:vertical;
            transform:translateZ(0px);
            }
          i{
            font-size: 40px;
            padding-top: 20px;
            transform:translateZ(0px);
            display: block;
            }
      }
      .left {
        transform: rotateY(270deg) translateX(-($iw/2) - $o) translateY(-$o) translateZ($o);
          transform-origin: center left;
          background:lighten($oprim,4%);
          text-align: center;
          .title{
            position:absolute;
            top:60%;
            height:0px;
            transform:translateY(-50%);
            }
          h1,h2{
            font-size: 19px;
            color: #3E5A77;
            margin:0;
            font-family: nunito, sans-serif;
            }
          h2{
            font-size:12px;
            padding:0px 20px;
            opacity:0.6;
            }
          i{
            font-size: 59px;
            color: #2A96AF;
            }
      }
      .top {
        transform: rotateX(-90deg) translateY((-($iw/2) - $o) ) translateZ(-$o) translateX(-$o - 1);
          transform-origin: top center;
          height: $iw + ($o * 2);
          background:$oprim
          }
      .bottom {
        transform: rotateX(90deg) translateY($iw/2 + $o ) translatez((-$ih + $iw) + $o + ($obh + $o*2) + 1) translateX(-$o);
          transform-origin: bottom center;
          height: $iw + ($o * 2);
          background: $oprim
          }

      .front {
        transform: translateZ(($iw/2) + $o) translateY(-$o) translateX(-$o - 1);
          background:lighten($oprim,10%);   
          }
    }
  }
}


// animation

@keyframes float{
  0%{
    transform:translateY(0px)
  }
  50%{
    transform:translateY($ao)
  }
  100%{
    transform:translateY(0px)
  }
}
@keyframes in{
  0%{
    opacity:0;transform:translateY(40px) scale(.2)
  }
  100%{
    opacity:1;transform:translateY(0px)  scale(1)
  }
}
              
            
!

JS

              
                // No.
              
            
!
999px

Console