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

              
                .linewrap
 - 10.times do
  .line

%input.manual{:type => "checkbox"}/
%input.kickflip{:type => "checkbox"}/
%input.hardflip{:type => "checkbox"}/
%input.ollie{:type => "checkbox"}/
%input.threesix{:type => "checkbox"}/
%input.shovit{:type => "checkbox"}/
%h1 Click Me
.outer
 .wrap
  .board
   .nose
   .tail
   .trucks
    .inner
    .wheel
   .trucks.rear
    .inner
    .wheel
              
            
!

CSS

              
                $b: #222;
$t: transparent;
$o: #fc9938;
$bl: #40abf4;


@mixin grip(){
  background:radial-gradient(circle at center, darken($b, 50%), darken($b, 50%) 1px, $t 1px), radial-gradient(circle at center, lighten($b, 5%), lighten($b, 5%) 1px, $t 1px), $b;
  background-size:5px 5px, 10px 7px, 50% 50%;
  background-position:0px 0px, 3px 3px, 50%;
}

body{
  width:100%;
  height:100vh;
  display:flex;
  justify-content:center;
  align-items:center;
  background: linear-gradient(to right, #e1eec3, #f05053);
  overflow:hidden;
  h1{
    text-transform:uppercase;
    font-size:12px;
    color:#fff;
    opacity:0.25;
    margin-top:400px;
  }
  .linewrap{
    position:absolute;
    width:110vw;
    height:110vh;
    top:-5vh;
    left:20vw;
    transform:skewX(-50deg);
    z-index:-1;
  }
  .line{
    width:1.5px;
    height:100px;
    background:linear-gradient(to bottom, $t,#fff);
    position:absolute;
    top:-50vh;
    left:0vw;
    animation:lines 3s linear infinite;
    transform:scaleY(0.25) translateY(110vh);
    opacity:0.5;
    @keyframes lines{
      to{
        transform:scaleY(1) translateY(150vh);
      }
    }
    @for $i from 1 through 20{
      &:nth-of-type(#{$i}){
        left:#{$i * 5}vw;
        height:#{$i * 10}px;
      }
    }
    @for $i from 1 through 10{
      &:nth-of-type(#{$i}){
        animation-delay:random(5) - 10 + s;
      }
    }
  }
  input{
    position:absolute;
    width:90px;
    height:30px;
    z-index:9;
    opacity:0;
  }
  .threesix{
    left:calc(50% + 10px);
    top:calc(50% - 70px); 
  }
  .shovit{
    left:calc(50% - 20px);
    top:calc(50% - 40px); 
  }
  .kickflip{
    left:calc(50% - 60px);
    top:calc(50% - 10px); 
  }
  .ollie{
    left:calc(50% - 130px);
    top:calc(50% + 55px); 
    height:60px;
    width:100px;
  }
  .hardflip{
    left:calc(50% - 90px);
    top:calc(50% + 25px); 
  }
  .manual{
    left:calc(50% + 40px);
    top:calc(50% - 120px);
    height:50px;
  }
  input:checked{
    pointer-events:none;
  }
  input:checked ~ .outer .wrap{
    animation:ollie 0.5s linear 1 forwards;
    &:after{
      animation:shadow 0.5s linear 1 forwards;
      @keyframes shadow{
      0%{
        transform:translateZ(-80px) translateX(20px) scale(0.85);
      }
      5%{
        transform:translateZ(-105px) translateX(20px) scale(0.85);
      }
      50%{
        transform:translateZ(-230px) translateX(20px) scale(0.65);
      }
      75%{
        transform:translateZ(-105px) translateX(20px) scale(0.85);
      }
      100%{
        transform:translateZ(-80px) translateX(20px) scale(0.85);
      }
    }
    }
    @keyframes ollie{
      0%{
        transform:rotateX(45deg) rotate(-50deg);
      }
      5%{
        transform:rotateY(10deg) rotateX(25deg) rotate(-50deg) translateZ(25px);
      }
      50%{
        transform:rotateX(45deg) rotate(-50deg) translateZ(200px);
      }
      75%{
        transform:rotateX(55deg) rotate(-50deg) translateZ(25px);
      }
      100%{
        transform:rotateX(45deg) rotate(-50deg);
      }
    }
  }
  .manual:checked ~ .outer .wrap{
    .board{
      animation:manual 1s ease-in-out 1 forwards;
      transform-origin:right;
      @keyframes manual{
        0%{
          transform:rotateY(0deg);
        }
        20%{
          transform:rotateY(20deg);
        }
        30%{
          transform:rotateY(21deg);
        }
        40%{
          transform:rotateY(20deg);
        }
        60%{
          transform:rotateY(21deg);
        }
        70%{
          transform:rotateY(20deg);
        }
        100%{
          transform:rotateY(0deg);
        }
      }
    }
    animation:none;
    &:after{
      animation:none;
    }
  }
  .threesix:checked ~ .outer .wrap .board{
      animation:threesixflip 0.5s linear 1 forwards;
      .wheel{
        animation:wheelspin 0.5s ease-in-out 1 forwards;
        &:before{
          animation:wheelspin 0.5s ease-in-out 1 forwards;
        }
      }
      @keyframes threesixflip{
        from{
          transform:rotateX(0deg) rotate(0deg);
        }
        to{
          transform:rotateX(-360deg) rotate(-360deg);
        }
      }
    }
  .shovit:checked ~ .outer .wrap .board{
      animation:shovit 0.5s ease-in-out 1 forwards;
      @keyframes shovit{
        to{
          transform:rotate(-360deg);
        }
      }
    }
  .kickflip:checked ~ .outer .wrap .board{
    .wheel{
      animation:wheelspin 0.5s ease-in-out 1 forwards;
      &:before{
        animation:wheelspin 0.5s ease-in-out 1 forwards;
      }
      @keyframes wheelspin{
        0%{
          box-shadow:-4px -5px 0 0 darken($bl, 10%), -8px -10px 0 0 darken($bl, 10%), -11px -15px 0 0 darken($bl, 10%);
        }
        50%{
          box-shadow:0px 0px 0 0 darken($bl, 10%), 0px 0px 0 0 darken($bl, 10%), 0px 0px 0 0 darken($bl, 10%);
        }
        100%{
          box-shadow:-4px -5px 0 0 darken($bl, 10%), -8px -10px 0 0 darken($bl, 10%), -11px -15px 0 0 darken($bl, 10%);
        }
      }
    }
      animation:kickflip 0.5s ease-in-out 1 forwards;
      @keyframes kickflip{
        to{
          transform:rotateX(-360deg);
        }
      }
    }
  .hardflip:checked ~ .outer .wrap .board{
      animation:hardflip 0.5s ease-in-out 1 forwards;
      .wheel{
        animation:wheelspin 0.5s ease-in-out 1 forwards;
        &:before{
          animation:wheelspin 0.5s ease-in-out 1 forwards;
        }
      }
      @keyframes hardflip{
        to{
          transform:rotateY(-360deg);
        }
      }
    }
  .wrap, .outer{
    position:absolute;
    left:calc(50% - 200px);
    top:calc(50% - 50px);
    width:400px;
    height:100px;
    transform-style:preserve-3d;
    transform:rotateX(45deg) rotate(-50deg);

  }
  .wrap{
    &:after{
      content:'';
      position:absolute;
      width:100%;
      height:100%;
      display:block;
      border-radius:80px;
      background:rgba(0,0,0,0.05);
      transform:translateZ(-80px) translateX(20px) scale(0.85);
    }
  }
  .outer{
    transform:none;
    animation:lean 3s ease-in-out infinite alternate;
    z-index:-1;
    @keyframes lean{
      0%{
        transform:rotateX(-2deg) rotateY(-5deg);
      }
      100%{
        transform:rotateX(2deg) rotateY(5deg);
      }
    }
  }
  .board{
    width:250px;
    height:100px;
    @include grip;
    position:absolute;
    top:0;
    left:80px;
    transform-style:preserve-3d;
    backface-visibility:hidden;
    &:before{
      content:'';
      position:absolute;
      width:100%;
      height:100%;
      background:url('https://puu.sh/zcoAN/346c71ca6c.png'), $o;
      background-size:80px, 100%;
      background-repeat:no-repeat;
      background-position:center;
      top:0;
      left:0;
      transform:rotateX(-180deg) translateZ(1px);
    }
    &:after{
      content:'';
      position:absolute;
      width:3px;
      height:3px;
      background:#ccc;
      left:35px;
      top:30px;
      box-shadow:0 20px 0 0 #ccc, -20px 20px 0 0 #ccc, -20px 0px 0 0 #ccc, 200px 20px 0 0 #ccc, 180px 20px 0 0 #ccc, 180px 0px 0 0 #ccc, 200px 0px 0 0 #ccc;
    }
    .trucks{
      position:absolute;
      width:10px;
      height:80px;
      background:#ccc;
      transform:translateZ(-30px);
      left:20px;
      top:10px;
      transform-style:preserve-3d;
      .wheel{
        position:absolute;
        width:30px;
        height:30px;
        background:radial-gradient(circle at center, #ccc, #ccc 5px, $bl 5px);
        transform-style:preserve-3d;
        border-radius:100%;
        transform:translateZ(-2.5px) rotateX(-90deg);
        top:-15px;
        left:calc(50% - 15px);
        box-shadow:-4px -5px 0 0 darken($bl, 10%), -8px -10px 0 0 darken($bl, 10%), -11px -15px 0 0 darken($bl, 10%);
        &:after{
          content:'';
          position:absolute;
          width:30px;
          height:30px;
          background:radial-gradient(circle at center, #ccc, #ccc 5px, $bl 5px);
          transform-style:preserve-3d;
          border-radius:100%;
          transform:translateZ(80px);
          top:0px;
          left:calc(50% - 15px);
          box-shadow:-4px -5px 0 0 darken($bl, 10%), -8px -10px 0 0 darken($bl, 10%), -11px -15px 0 0 darken($bl, 10%);
        }
      }
      &.rear{
        left:auto;
        right:20px;
      }
      .inner{
        width:100%;
        height:100%;
        background:#ccc;
        position:absolute;
        left:0;
        top:0;
        transform:translateZ(-10px);
        transform-style:preserve-3d;
        &:before{
          content:'';
          position:absolute;
          width:30px;
          height:30px;
          background:#bbb;
          transform:translateZ(15px);
          left:calc(50% - 10px);
          top:calc(50% - 15px);
          
        }
      }
      &:before, &:after{
        content:'';
        position:absolute;
        width:100%;
        height:100%;
        background:#ddd;
        left:0;
        top:0;
        transform-origin:right;
        transform:rotateY(-90deg);
        display:block;
        
      }
      &:after{
        transform:rotateY(-90deg) translateZ(10px);
      }
    }
    .nose, .tail{
      position:absolute;
      width:80px;
      height:100%;
      left:-80px;
      box-shadow:5px 0px 0 0 $b;
      @include grip;
      border-radius:80px 0 0 80px;
      transform-origin:right;
      transform-style:preserve-3d;
      transform:rotateY(10deg);
      backface-visibility:hidden;
      &:before{
        content:'';
        position:absolute;
        width:100%;
        height:100%;
        background:$o;
        top:0;
        left:0;
        transform:rotateX(-180deg) translateZ(1px);
        border-radius:80px 0 0 80px;
        box-shadow:2px 0px 0 0 $o;
      }
    }
    .nose{
      left:auto;
      right:-80px;
      border-radius:0 80px 80px 0;
      box-shadow:-2.5px 0px 0 0 $b;
      transform-origin:left;
      transform:rotateY(-10deg);
      &:before{
        border-radius:0 80px 80px 0;
        box-shadow:-2px 0px 0 0 $o;
      }
    }
  }
  
}
              
            
!

JS

              
                $( "input" ).change(function() {
    setTimeout(function(){
    $('input').prop('checked', false);
  }, 1000);
});
              
            
!
999px

Console