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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <div class="container">
  <div class="canvas">
    <div class="box">
      <div class="back"></div>
      <div class="shines">
        <div class="core"></div>
        <div class="core-shade"></div>
        <div class="raising"></div>
        <div class="light"></div>
        <div class="shade one"></div>
        <div class="shade two"></div>
        <div class="shade three"></div>
      </div>
      <div class="front"></div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                @import "bourbon";
* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

.container {
  width: 100%;
  height: 100%;
  background: radial-gradient(#3e6690 0%, #111e34 100%);
}

.canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  @include transform(translate(-50%, -50%))
}

.box {
  width: 200px;
  margin: 0 auto;
  position: relative;
  .back {
    width: 160px;
    height: 160px;
    &:before,
    &:after {
      content: "";
      display: block;
      float: left;
    }
    &:before {
      width: 80px;
      height: 110px;
      background: #4594cf;
      @include transform(skewY(-25deg));
    }
    &:after {
      width: 80px;
      height: 110px;
      background: #50a3e0;
      @include transform(skewY(25deg));
    }
  }
  .front {
    width: 160px;
    height: 110px;
    position: absolute;
    top: 38px;
    left: 0;
    z-index: 3;
    &:before,
    &:after {
      content: "";
      display: block;
      float: left;
      box-shadow: 0 10px 10px -7px rgba(0, 0, 0, .5);
    }
    &:before {
      width: 80px;
      height: 110px;
      background: #50a3e0;
      @include transform(skewY(25deg));
    }
    &:after {
      width: 80px;
      height: 110px;
      background: #4595d0;
      @include transform(skewY(-25deg));
    }
  }
  .shines {
    width: 160px;
    height: 110px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    .core {
      width: 10px;
      height: 10px;
      margin: 60px auto 0 auto;
      background: #fff;
      border-radius: 100%;
      box-shadow: 0 0 30px 40px rgba(255, 255, 255, .8);
    }
    .core-shade {
      width: 50px;
      height: 100px;
      margin: -100px auto 0 auto;
      background: rgba(255,255,255,.1);
      border-radius: 100%;
      box-shadow: 0 0 30px 40px rgba(255, 255, 255, .1);
      animation:core-shading 2s infinite;
    }
    .raising {
      position: absolute;
      width: 0;
      height: 600px;
      bottom: 30px;
      left: 50%;
      z-index: 2;
      box-shadow: 0 0 50px 30px rgba(255, 255, 255, .3);
    }
    .light {
      position: absolute;
      width: 0;
      height: 600px;
      bottom: 30px;
      left: 50%;
      z-index: 2;
      box-shadow: 0 0 40px 10px rgba(240, 208, 0, .2);
      animation:shine 5s 0s infinite;
    }
    .shade {
      position: absolute;
      width: 0;
      height: 600px;
      bottom: 30px;
      z-index: 2;
      box-shadow: 0 0 10px 1px rgba(255, 255, 255, .1);
      &.one{
        left: 40%;
        animation:shade-one 5s 0s infinite;
      }
      &.two{
        left: 46%;
        animation:shade-two 5s 0s infinite;
      }
      &.three{
        left: 53%;
        animation:shade-three 5s 0s infinite;
      }
    }
  }
}

@keyframes shine {
    0%,50%,100% {left:50%}
    25% {left:45%;}
    75% {left:55%;}
}

@keyframes shade-one {
    0%,50%,100% {left:40%}
    25% {left:47%;}
    75% {left:54%;}
}
@keyframes shade-two {
    0%,50%,100% {left:46%}
    25% {left:41%;}
    75% {left:50%;}
}
@keyframes shade-one {
    0%,50%,100% {left:53%}
    25% {left:45%;}
    75% {left:47%;}
}
@keyframes core-shading {
    50% {height:30px;margin: -90px auto 0 auto;}
}
              
            
!

JS

              
                /* UNDER CONSTRUCTION  */

 //Firefox
 $('.box').bind('DOMMouseScroll', function(e){
     if(e.originalEvent.detail > 0) {
         //scroll down
         console.log('Down');
     }else {
         //scroll up
         console.log('Up');
     }

     //prevent page fom scrolling
     return false;
 });

 //IE, Opera, Safari
 $('.box').bind('mousewheel', function(e){
     if(e.originalEvent.wheelDelta < 0) {
         //scroll down
         console.log('Down');
     }else {
         //scroll up
         console.log('Up');
     }

     //prevent page fom scrolling
     return false;
 });
              
            
!
999px

Console