Pen Settings



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


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


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.


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.


                <div class="wrapper" id="js-wrapper">
	<div class="sections" id="js-slideContainer">
		<section class="section" id="section01">
			<span class="section__title" id="title1">Section One</span>
      <span id="trigger--title1"></span>
		<section class="section" id="section02">
			<span class="section__title" id="title2">Section Two</span>
      <span id="trigger--title2"></span>
		<section class="section" id="section03">
			<span class="section__title" id="title3">Section Three</span>
      <span id="trigger--title3"></span>
		<section class="section" id="section04">
			<span class="section__title" id="title4">Section Four</span>
      <span id="trigger--title4"></span>
    <section class="section" id="section05">
			<span class="section__title" id="title5">Section Five</span>
      <span id="trigger--title5"></span>


                // ---------- GENERAL STYLES ---------- //

* {
  box-sizing: border-box;

body {
	font-family: 'Fauna One', serif;
html {
	height: 100%

// ---------- SCROLLING STYLES ---------- //

$panelcount: 5; // set # of panels/sections here

  width: 100%;
  height: 100%;
  overflow: hidden;
  perspective: 1000;

.section {
  & {
    height: 100%;
    width: calc( 100% / #{$panelcount} );
    float: left;

    // aesthetic only ----
    position: relative;
    $colors: #F64747, #22A7F0, #F9690E, #9B59B6, #03C9A9;
    @for $i from 1 through length($colors) {
      &:nth-child(#{$i}) {
        background: nth($colors, $i)
  &s {
    width: percentage($panelcount);
    height: 100%;
  &__title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    color: #fff;


                $(function () { // wait for document ready
  var controller = new ScrollMagic.Controller();

  var horizontalSlide = new TimelineMax()
  // animate panels
  .to("#js-slideContainer", 1,   {x: "-20%", className: '+=active'})	
  .to("#js-slideContainer", 1,   {x: "-40%"})
  .to("#js-slideContainer", 1,   {x: "-60%"})
  .to("#js-slideContainer", 1,   {x: "-80%"})

  // create scene to pin and link animation
  new ScrollMagic.Scene({
    triggerElement: "#js-wrapper",
    triggerHook: "onLeave",
    duration: "400%"