Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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

              
                .refresh
  %svg{:height => "50", :viewBox => "0 0 50 50", :width => "50", :xmlns => "http://www.w3.org/2000/svg"}
    %path{:d => "M26.083 13C32.665 13 38 18.374 38 25.003c0 6.5-5.13 11.794-11.534 11.997v-2.184c5.207-.202 9.367-4.518 9.367-9.813 0-5.424-4.365-9.82-9.75-9.82-4.83 0-8.84 3.54-9.615 8.183H18.5l-3.25 3.82-3.25-3.82h2.277C15.07 17.51 20.053 13 26.083 13z", :fill => "#191747", "fill-rule" => "evenodd"}/
    
.main-ctr
  .calendar-ctr

    .top-ctr
      .top.top-0

      - (1..28).each do |i|
        .top{:class => "top-#{i}"}
          .number #{i}

      .top-29
        .number 29

    .bottom-ctr
      .bottom.bottom-0

      - (1..29).each do |i|
        .bottom{:class => "bottom-#{i}"}
          .number #{i}
              
            
!

CSS

              
                @import "bourbon";
@import url(https://fonts.googleapis.com/css?family=Roboto:400,300,500);
@import url(https://fonts.googleapis.com/css?family=Quicksand:400,700);

html,
body {
  display: table;
  width: 100%;
  height: 100%;
  background: #f8f8f8;
}

.main-ctr {
  display: table-cell;
  vertical-align: middle;
  text-align: center;
}

.calendar-ctr {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  display: block;
  position: relative;
  @include perspective(500px);
  font-family: Roboto;
  font-weight: 400;
  
  .top {
    @include position(absolute, 0 0 x 0);
    height: 50%;
    background: #3C75D3;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    overflow: hidden;
    @include transform-origin(center bottom);
    will-change: transform;
    
    &:before {
      content: "";
      @include position(absolute, 0 0 0 0);
      border-top: 1px solid rgba(0,0,0,.25);
      border-top-left-radius: 15px;
      border-top-right-radius: 15px;
      border-bottom: 1px solid rgba(255,255,255,.05);
    }
    
    &.top-0 {
      background: #ddd;
    }
    
    @for $i from 0 through 29 {
      
      &.top-#{$i} {
        z-index: 29 - $i;
      }
      
    }
    
    .number {
      @include position(absolute, 0 0 -100% 0);
      text-align: center;
      line-height: 200px;
      font-size: 120px;
      color: white;
      text-shadow: 2px 2px rgba(0,0,0,.05);
    }
  }
    
  .top-29 {
    @include position(absolute, 0 0 x 0);
    height: 50%;
    background: #3C6BD2;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    overflow: hidden;
    @include transform-origin(center bottom);
    will-change: transform;
    
    &:before {
      content: "";
      @include position(absolute, 0 0 0 0);
      border-top: 1px solid rgba(0,0,0,.25);
      border-top-left-radius: 15px;
      border-top-right-radius: 15px;
      border-bottom: 1px solid rgba(255,255,255,.05);
    }
    
    .number {
      @include position(absolute, 0 0 -100% 0);
      text-align: center;
      line-height: 200px;
      font-size: 120px;
      color: white;
      text-shadow: 2px 2px rgba(0,0,0,.05);
    }
  }
  
  .bottom {
    @include position(absolute, x 0 0 0);
    height: 50%;
    background: #4887F2;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    overflow: hidden;
    @include transform-origin(center top);
    @include transform(rotateX(90deg));
    will-change: transform;
    
    &:before {
      content: "";
      @include position(absolute, 0 0 0 0);
      border-bottom: 1px solid rgba(0,0,0,.25);
      border-bottom-left-radius: 15px;
      border-bottom-right-radius: 15px;
      border-top: 1px solid rgba(0,0,0,.15);
    }
    
    @for $i from 0 through 29 {
      
      &.bottom-#{$i} {
        z-index: $i;
      }
      
    }
    
    &.bottom-0 {
      background: #eee;
      @include transform(rotateX(0deg));
    }
    
    .number {
      @include position(absolute, -100% 0 0 0);
      text-align: center;
      line-height: 200px;
      font-size: 120px;
      color: white;
      text-shadow: 2px 2px rgba(0,0,0,.05);
    }
  }
}

// refresh button
.refresh {
  @include position(fixed, 15px 15px x x);
  @include transform-origin(right top);
  @include transform(scale(.7));
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  z-index: 99;
  cursor: pointer;
  box-shadow: 0 1px 1px 1px rgba(0,0,0,.1);
}
              
            
!

JS

              
                var tl = new TimelineMax({});

tl.set(".calendar-ctr", {
  scale: .75
})

tl.timeScale(1);

tl.staggerTo(".bottom", .3, {
    rotationX: "0deg",
  }, .3)
  
  .staggerTo(".top", .3, {
    rotationX: "-90deg"
  }, .3, 0)

  .to(".calendar-ctr", 9, {
    scale: 1
  }, 0)

// restart animation
var refresh = document.querySelector(".refresh");
refresh.addEventListener("click", function(){
  tl.restart();
})
              
            
!
999px

Console