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.

            
              <!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Page transition</title>
</head>

<body ng-app>
    <div class="wrapper">

    <header>
        <h1>Page transition</h1>

        <nav>
            <li>Page 1</li>
            <li>Page 2</li>
            <li>Page 3</li>
        </nav>
    </header>
        

        <ul >
          <li class="item sage"></li>
          <li class="item cream"></li>
          <li class="item coral"></li>
          <li class="item blood"></li>
        </ul>
    </div>
    
</body>

</html>
            
          
!
            
              @import "compass/css3";

$dark: #2A363B;


/*-------------------- *\
  Squish
/*-------------------- */

/* Could further paramaterize to include target class & timing function */

@mixin squish($amount, $time) {
    @include transition(transform $time  ease-out, opacity $time  ease-out);
    .loading &, &.loading {
        @include transform(scale($amount));
        @include transition(transform $time  ease-in, opacity $time  ease-in);
        opacity:0;
    }
}

/*-------------------- *\
  Apply mixin
/*-------------------- */

.wrapper {
    @extend .group;
    padding:2em;
    background:darken($dark,3%);
    @include squish(0.975, 0.25s);
}


.item {
    width:15em;
    height:15em;
    border-radius:50%;
    background:#fff;
    float:left;
    margin:1em;
    @include squish(0.8, 0.3s);
}



/*-------------------- *\
  Page
/*-------------------- */

html {
   background:$dark;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility:    hidden;
  -ms-backface-visibility:     hidden;
}

body {
    width:75%;
    margin:auto;
    color:#fff;
    font-family:Helvetica, sans-serif;
}

li {
    list-style:none;
    padding:0;
    margin:0;
}

header {
    margin-bottom:2em;
}


nav li {
    margin-right:1em;
    cursor:pointer;
    display:inline;
}

ul {
    padding:0;
    margin:0;
}

/*-------------------- *\
  Colors
/*-------------------- */

$colors: 
    sage #99B898,
    cream #FECEA8,
    coral #FF847C,
    blood #E84A5F
;

@each $color in $colors {
   .#{nth($color,1)}{
         background-color:nth($color,2);
    }
}


/*-------------------- *\
  Utils
/*-------------------- */

.group:before,
.group:after {
  display: table;
  line-height: 0;
  content: "";
}
.group:after { clear: both;}














            
          
!
            
              $('nav li').click(function(){
     $('.wrapper').addClass('loading');
});


function transEnd(e) {
    var el = $(e.target);
    if ( el.hasClass('wrapper') ) {
        $('.wrapper').removeClass('loading');
    }
}


$('.wrapper').on('webkitTransitionEnd transitionend', function(e){
    setTimeout(function() {
        transEnd(e);
    }, 250);
});


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

Console