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.

            
              <div class="page-wrap J_wraper">
  <div class="page page--first active">
    <div class="ani ani--first">
    </div>
  </div>
  <div class="page page--second">    
    <div class="ani ani--second">
    </div>
  </div>
  <div class="page page--third">    
    <div class="ani ani--third"></div>
  </div>
</div>
            
          
!
            
              .page-wrap{
  position: relative;
  width: 320px;
  height: 504px;
  overflow: hidden;
  background: #eee;
}
.page {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  &--first {
    background: #ddd;
  }
  &--second {
    background: #2ebaae;
  }
  &--third {
    background: #3d5a92;
  }
  &.active {
    z-index: 1;
  }
}
.ani {
    width: 100px;
    height: 50px;
    color: #fff;
    line-height: 50px;
    text-align: center;
    background: #6190e8;
    margin: 110px;
    float: left;
  &--first { 
    animation: ani1 2s ease both;
    animation-play-state: paused;
    -webkit-animation: ani1 2s ease both;
    -webkit-animation-play-state: paused;
  }
  &--second { 
    animation: ani2 2s ease both;
    animation-play-state: paused;
    -webkit-animation: ani2 2s ease both;
    -webkit-animation-play-state: paused;
  }
  &--third { 
    animation: ani3 2s ease both;
    animation-play-state: paused;
    -webkit-animation: ani3 2s ease both;
    -webkit-animation-play-state: paused;
  }
}
@keyframes ani1 {
  0% { opacity: 0 }
  100% { opacity: 1 }
}
@-webkit-keyframes ani1 {
  0% { opacity: 0 }
  100% { opacity: 1 }
}
@keyframes ani2 {
  0% { transform: scale(0) }
  100% { transform: scale(1) }
}
@-webkit-keyframes ani2 {
  0% { -webkit-transform: scale(0) }
  100% { -webkit-transform: scale(1) }
}
@keyframes ani3 {
  0% { transform: translateY(1000px)  }
  100% { transform: translateY(0) }
}
@-webkit-keyframes ani3 {
  0% { -webkit-transform: translateY(1000px)  }
  100% { -webkit-transform: translateY(0) }
}
.active .ani {
    animation-play-state: running;
    -webkit-animation-play-state: running;
}
            
          
!
            
              var $page = $('.J_wraper .page');
$page.on('click',function(e) {
  $(this).next().addClass('active');
})

            
          
!
999px
Loading ..................

Console