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

              
                <div class="wrap">
  <div class="lineWrap intro centered">
    <h1 class="">Just <span>for</span> FUN!</h1>
  </div>
</div>

<!--  slide elements 02 ======== -->
<div class="fromLeft elemLeft02">
  <div class="lineWrap centered">
    <h1 class=""><span>no</span> 02</h1>
  </div>
</div>

<div class="fromRight elemRight02"></div>

<!--  slide elements 03 ======== -->
<div class="fromRight elemRight03a"></div>

<div class="fromRight elemRight03b">
  <div class="lineWrap centered">
    <h1 class=""><span>no</span> 03</h1>
  </div>
</div>

<!--  slide elements 04 ======== -->

<div class="slide slide04">
  <div class="fromTopLeft elemTopLeft04">
    <div class="lineWrap centered">
      <h1 class=""><span>no</span></h1>
    </div>
  </div>
  <div class="fromBottomRight elemBottomRight04">
    <div class="lineWrap centered">
      <h1 class="">04</h1>
    </div>
  </div>
</div>

<!--  slide 05 ======== -->

              
            
!

CSS

              
                body, p {
  margin: 0;
  padding: 0;
  font-family:sans-serif;
  background-color:grey;
  overflow:hidden;
}
h1 {
  position: relative;
  font-weight: 800;
  font-size: 80px;
  line-height: 64px;
  color: #c1c1c1;
  margin: 0;
}
h1 span{
  font-size: 35px;
  margin: 0 -15px 0 -5px;
}
.lineWrap{
  position: absolute;
  top: 50%;
  left: 50%;
  width:100%;
  height: 64px;
  text-align:center;
  overflow: hidden;
}


.wrap{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100vh;
}


.fromRight{
  position: absolute;
  top: 0;
  left: 100%;
  width: 50%;
  height: 100%;
  overflow: hidden;
}
.fromLeft{
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  overflow: hidden;
}
.fromTopLeft{
  position: absolute;
  top: -100%;
  left:0;
  width: 50%;
  height: 100%;
  overflow: hidden;
}
.fromBottomRight{
  position: absolute;
  top: 100%;
  left:50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
}
img{
  position: relative;
  height: 120%;
}

.intro h1{
  top:65px;
}

.elemLeft02{
  background-color:green;
}
.elemRight03a{
  z-index:-1;
    background-image: url(https://unsplash.it/1000/1000?image=766);
  background-repeat: no-repeat;
  background-size: cover;
}
.elemRight02{
  background-image: url(https://unsplash.it/1000/1200?image=889);
  background-repeat: no-repeat;
  background-size: cover;
  background-position-y: 42%;
}
.elemRight03b{
  height:50%;
  background-color:darkgrey;
}
.elemTopLeft04{
  background:grey;
}
.elemBottomRight04{
  background:grey;
}
              
            
!

JS

              
                console.clear();

//defaultEase for all animations - except ...
TweenLite.defaultEase = Linear.easeNone;

TweenMax.set(".centered", {xPercent:-50, yPercent:-50});


var action = new TimelineMax()
.to('.intro h1',0.5,{top:0})

.addPause().addLabel('two')
.to('.intro h1',0.5,{y:65},'two')
.to('.elemRight02',0.5,{xPercent:-100,ease: Power2.easeOut},'two')
.to('.elemLeft02',0.5,{xPercent:200,ease: Power2.easeOut},'two')
.to('.elemLeft02',0.2,{scale:1.5, transformOrigin:'center', repeat:1, yoyo:true})
.to('.elemRight03a',0.5,{xPercent:-100,ease: Power2.easeOut},'two')

.addPause().addLabel('three')
.to('.elemLeft02',0.5,{xPercent:100,ease: Power2.easeOut},'three')
.to('.elemRight03a',0.5,{xPercent:-200,ease: Power2.easeOut},'three')
.to('.elemRight03b',0.5,{xPercent:-100,ease: Power2.easeOut},'three+=0.2')
.to('.elemRight03b .lineWrap',0.3,{rotation:360}, '-=0.5')

.addPause().addLabel('four')
.to('.elemTopLeft04',1,{yPercent:100,ease: Bounce.easeOut}, 'four')
.to('.elemBottomRight04',1,{yPercent:-100,ease: Bounce.easeOut}, 'four')


$(window).on("mousewheel DOMMouseScroll", onMouseWheel);

function onMouseWheel(event)
  {
    //Normalize event wheel delta
    var delta = event.originalEvent.wheelDelta / 30 || -event.originalEvent.detail;

    if(!action.isActive() && delta < -1)
    {

      action.play();
    }
    else if(!action.isActive() && delta > 1)
    {
 
      action.reverse();
    }
    event.preventDefault();
  }


              
            
!
999px

Console