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

              
                <!-- / A set of walkthrough screens in HTML/CSS/JS. A personal experiment with layering images, CSS3 transitions, & flexbox. -->
<button class='open-walkthrough'>Start</button>
<div class='walkthrough show reveal'>
  <div class='walkthrough-pagination'>
    <a class='dot active'></a>
    <a class='dot'></a>
    <a class='dot'></a>
    <a class='dot'></a>
    <a class='dot'></a>
  </div>
  <div class='walkthrough-body'>
    <ul class='screens animate'>
      <li class='screen active'>
        <div class='media logo'>
          <img class='logo' src='https://s3.amazonaws.com/jebbles-codepen/icon.png'>
        </div>
        <h3>
          Product Intro
          <br>Walkthrough</br>
        </h3>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.</p>
      </li>
      <li class='screen'>
        <div class='media books'>
          <img class='icon' src='https://s3.amazonaws.com/jebbles-codepen/book_icon_1.png'>
          <img class='icon' src='https://s3.amazonaws.com/jebbles-codepen/book_icon_2.png'>
          <img class='icon' src='https://s3.amazonaws.com/jebbles-codepen/book_icon_3.png'>
        </div>
        <h3>
          Data and File
          <br>Management</br>
        </h3>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.</p>
      </li>
      <li class='screen'>
        <div class='media bars'>
          <img class='icon' src='https://s3.amazonaws.com/jebbles-codepen/bar_icon_axis.png'>
          <img class='icon' src='https://s3.amazonaws.com/jebbles-codepen/bar_icon_3.png'>
          <img class='icon' src='https://s3.amazonaws.com/jebbles-codepen/bar_icon_2.png'>
          <img class='icon' src='https://s3.amazonaws.com/jebbles-codepen/bar_icon_1.png'>
        </div>
        <h3>
          Analytics
          <br>and Metrics</br>
        </h3>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.</p>
      </li>
      <li class='screen'>
        <div class='media files'>
          <img class='icon' src='https://s3.amazonaws.com/jebbles-codepen/file_icon_1.png'>
          <img class='icon' src='https://s3.amazonaws.com/jebbles-codepen/file_icon_2.png'>
          <img class='icon' src='https://s3.amazonaws.com/jebbles-codepen/file_icon_3.png'>
          <img class='icon' src='https://s3.amazonaws.com/jebbles-codepen/file_icon_4.png'>
        </div>
        <h3>
          Reporting
          <br>and Insights</br>
        </h3>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.</p>
      </li>
      <li class='screen'>
        <div class='media comm'>
          <img class='icon' src='https://s3.amazonaws.com/jebbles-codepen/comm_icon_1.png'>
          <img class='icon' src='https://s3.amazonaws.com/jebbles-codepen/comm_icon_2.png'>
        </div>
        <h3>
          Communications
          <br>Tools</br>
        </h3>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.</p>
      </li>
    </ul>
    <button class='prev-screen'>
      <i class='icon-angle-left'></i>
    </button>
    <button class='next-screen'>
      <i class='icon-angle-right'></i>
    </button>
  </div>
  <div class='walkthrough-footer'>
    <button class='button next-screen'>Next</button>
    <button class='button finish close' disabled='true'>Finish</button>
  </div>
</div>

              
            
!

CSS

              
                
@mixin material-shadow() {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.23), 0 10px 40px rgba(0, 0, 0, 0.19);
  box-shadow: 0 13px 25px rgba(0, 0, 0, 0.10), 0 17px 39px rgba(0, 0, 0, 0.15);
}

$module-font-size: 14px;
$bezier: cubic-bezier(.25,.8,.25,1);

body {
  color: #444;
  font-family: "Open Sans";
  font-weight: light;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(150deg, white 0%, white 50%, #F3F6F8 50%, #F3F6F8 100%);
}

.open-walkthrough {
  border: 0;
  background: #499F68;
  color: white;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 12px;
  height: 40px;
  width: 120px;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -20px;
  margin-left: -60px;
}

// =================================================================================================
// Walkthrough
// =================================================================================================
.walkthrough {
  @include material-shadow();
  background: linear-gradient(to right bottom, #9e66c6 , #6027e1);
  background: white;
  border-radius: 0;
  display: none;
  flex-direction: column;
  flex: 0 0 auto;
  font-size: $module-font-size;
  height: 464px;
  overflow: hidden;
  transition: opacity 0.4s $bezier, transform 0.4s $bezier, box-shadow 0.4s $bezier;
  width: 400px;
  z-index: 1000;
  border-radius: 3px;

  &.show {
    display: flex;
    opacity: 0;
    transform: translateY(72px);
  }

  &.reveal {
    opacity: 1;
    transform: translateY(0);
  }

  .walkthrough-body {
    align-items: center;
    display: flex;
    flex: 1;
    text-align: center;

    .prev-screen,
    .next-screen {
      align-self: stretch;
      background: none;
      border: 0;
      margin-top: 40px;
      color: rgba(white, 0.25);
      color: #ccc;
      cursor: pointer;
      flex: 0 0 auto;
      font-size: 24px;
      opacity: 1;
      outline: none;
      padding: 16px;
      transform: scale(1);
      transition: transform 0.4s $bezier, color 0.4s $bezier, opacity 0.4s $bezier;
      z-index: 1000;

      &:hover,
      &:active {
        color: #888;
        transform-origin: center;
        transform: scale(1.25);
      }

      &:disabled {
        opacity: 0;
      }
    }

    .prev-screen {
      order: 1;
    }

    .next-screen {
      order: 3;
    }

    .screens {
      flex: 1;
      align-self: stretch;
      position: relative;
      margin: 0 -16px;
      padding: 0;
      order: 2;

      .screen {
        position: absolute;
        list-style-type: none;
        padding: 0 25px;
      }
    }

    .media {
      background: rgba(white, 0.25);
      background: #fafafa;
      border-radius: 132px;
      height: 132px;
      margin: 32px auto;
      width: 132px;
    }

    h3 {
      font-size: 15px;
      line-height: 1.4em;
      text-transform: uppercase;
      letter-spacing: 0.15em;
    }

    p {
      line-height: 1.6em;
      font-size: 13px;
      margin-top: 16px;
      padding-top: 0;
      color: #666;
    }
  }

  .walkthrough-pagination {
    align-items: center;
    display: flex;
    justify-content: center;
    margin-top: 24px;

    .dot {
      background: rgba(black, 0.25);
      border-radius: 8px;
      height: 8px;
      margin: 0 4px;
      transform: scale(0.75);
      transition: transform 0.4s $bezier, background 0.4s $bezier;
      width: 8px;

      &.active {
        background: #537589;
        transform: scale(1);
        transition-delay: 0.4s;
      }
    }
  }

  .walkthrough-footer {
    display: flex;
    flex: 0 0 auto;
    justify-content: space-around;
    padding: 0;

    button {
      height: 50px;
      border: 0;
      background: #5da3f2;
      background: #537589;
      background: #499F68;
      font-weight: bold;
      text-transform: uppercase;
      letter-spacing: 0.15em;
      border-radius: 0;
      color: white;
      flex: 1;
      font-size: 12px;
      margin: 0;
      outline: 0;
      padding: 12px;
      transition: opacity 0.4s $bezier, background 0.4s $bezier;
      cursor: pointer;
      &:hover {
        background: lighten(#499F68, 10%);
      }
      &:active {
        background: #3B8355;
      }

      &:disabled {
        cursor: pointer;
      }

      &.finish {
        background: #499F68;
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        opacity:0;
        transform: scale(0, 1);
        transform-origin: center;
        transition: opacity 0.4s $bezier, background 0.4s $bezier, transform 0.4s $bezier;
        &:hover {
          background: #65AD7F;
        }
        &:active {
          background: #3B8355;
        }
        &.active {
          transform: scale(1, 1);
          opacity: 1;
        }
      }
    }
  }

  //Animation styles

  .screens {
    margin: 0;

    .media {
      
      img{
        filter: hue-rotate(300deg);
      }
      
      .status-badge {
        left: 136px;
        opacity: 0;
        position: absolute;
        top: 104px;
        transform: scale(0);
        transition: opacity 0.4s $bezier, transform 0.4s $bezier;
        transition-delay: 0.6s;

        i {
          display: inline;
        }
      }

      &.logo {
        .logo {
          margin-top: 20px;
          opacity: 0;
          transform: translateY(-60px);
          transition: opacity 0.4s $bezier, transform 0.4s $bezier;
          width: 80px;
        }
      }
      .icon {
        position: absolute;
        opacity: 0;
        transform: translateY(-30px);
        transition: opacity 0.4s $bezier, transform 0.4s $bezier;
        width: 132px;
        left: 50%;
        top: 32px;
      }
      &.bars {
        .icon {
          transform: translate(40px, 20px);
          &:nth-of-type(2) {
            transform: scale(0.25);
            transform-origin: 30% 54%;
          }
          &:nth-of-type(3) {
            transform: scale(0.25);
            transform-origin: 30% 40%;
          }
          &:nth-of-type(4) {
            transform: scale(0.25);
            transform-origin: 30% 26%;
          }
        }
      }
      &.files {
        .icon {
          transform: translate(40px, 20px);
        }
      }
      &.comm {
        .icon {
          transform: scale(0.25);
          transform-origin: 29% 73%;

          &:nth-child(2) {
          transform-origin: 66% 85%;
          }
        }
      }
    }

    .screen {
      opacity: 0;
      position: absolute;
      transform: translateX(-72px);
      transition: all 0.4s $bezier;

      &.active {
        opacity: 1;
        transform: translateX(0) scale(1);
        transition-delay: 0.4s;

        ~ .screen {
          opacity: 0;
          transform: translateX(72px);
        }

        .media {
          .status-badge {
            opacity: 1;
            transform: scale(1.75);
          }

          &.logo {

            .logo {
              opacity: 0.8;
              transform: translateY(0);
              transition-delay: 0.6s;
            }

            .status-badge {
              transition-delay: 1s;
            }
          }

          &.books {
            .icon {
              opacity: 1;
              transform: translate(-50%, 0);
              transition-delay: 0.6s;
              &:nth-child(2) {
                transition-delay: 0.725s;
              }
              &:nth-child(3) {
                transition-delay: 0.850s;
              }
            }
            .status-badge {
              transition-delay: 1.4s;
            }
          }

          &.bars {
            .icon {
              opacity: 1;
              transform: translate(-50%,0) scale(1);
              transition-delay: 0.6s;
              &:nth-child(2) {
                transition-delay: 1.050s;
              }
              &:nth-child(3) {
                transition-delay: 0.925s;
              }
              &:nth-child(4) {
                transition-delay: 0.8s;
              }
            }
          }
          &.files {
            .icon {
              opacity: 1;
              transform: translate(-50%,0);
              transition-delay: 0.9s;
              &:nth-child(3) {
                transition-delay: 0.8s;
              }
              &:nth-child(2) {
                transition-delay: 0.7s;
              }
              &:nth-child(1) {
                transition-delay: 0.6s;
              }
            }
            .status-badge {
              transition-delay: 1.6s;
            }
          }
          &.comm {
            .icon {
              opacity: 1;
              transform: translate(-50%,0) scale(1);
              transition-delay: 0.6s;
              &:nth-child(2) {
                transition-delay: 0.8s;
              }
            }
            .status-badge {
              transition-delay: 1.6s;
            }
          }
        }
      }
    }
  }
}
              
            
!

JS

              
                (function () {
  $(document).ready(function () {
    var walkthrough;
    walkthrough = {
      index: 0,
      nextScreen: function () {
        if (this.index < this.indexMax()) {
          this.index++;
          return this.updateScreen();
        }
      },
      prevScreen: function () {
        if (this.index > 0) {
          this.index--;
          return this.updateScreen();
        }
      },
      updateScreen: function () {
        this.reset();
        this.goTo(this.index);
        return this.setBtns();
      },
      setBtns: function () {
        var $lastBtn, $nextBtn, $prevBtn;
        $nextBtn = $('.next-screen');
        $prevBtn = $('.prev-screen');
        $lastBtn = $('.finish');
        if (walkthrough.index === walkthrough.indexMax()) {
          $nextBtn.prop('disabled', true);
          $prevBtn.prop('disabled', false);
          return $lastBtn.addClass('active').prop('disabled', false);
        } else if (walkthrough.index === 0) {
          $nextBtn.prop('disabled', false);
          $prevBtn.prop('disabled', true);
          return $lastBtn.removeClass('active').prop('disabled', true);
        } else {
          $nextBtn.prop('disabled', false);
          $prevBtn.prop('disabled', false);
          return $lastBtn.removeClass('active').prop('disabled', true);
        }
      },
      goTo: function (index) {
        $('.screen').eq(index).addClass('active');
        return $('.dot').eq(index).addClass('active');
      },
      reset: function () {
        return $('.screen, .dot').removeClass('active');
      },
      indexMax: function () {
        return $('.screen').length - 1;
      },
      closeModal: function () {
        $('.walkthrough, .shade').removeClass('reveal');
        return setTimeout(() => {
          $('.walkthrough, .shade').removeClass('show');
          this.index = 0;
          return this.updateScreen();
        }, 200);
      },
      openModal: function () {
        $('.walkthrough, .shade').addClass('show');
        setTimeout(() => {
          return $('.walkthrough, .shade').addClass('reveal');
        }, 200);
        return this.updateScreen();
      } };

    $('.next-screen').click(function () {
      return walkthrough.nextScreen();
    });
    $('.prev-screen').click(function () {
      return walkthrough.prevScreen();
    });
    $('.close').click(function () {
      return walkthrough.closeModal();
    });
    $('.open-walkthrough').click(function () {
      return walkthrough.openModal();
    });
    walkthrough.openModal();

    // Optionally use arrow keys to navigate walkthrough
    return $(document).keydown(function (e) {
      switch (e.which) {
        case 37:
          // left
          walkthrough.prevScreen();
          break;
        case 38:
          // up
          walkthrough.openModal();
          break;
        case 39:
          // right
          walkthrough.nextScreen();
          break;
        case 40:
          // down
          walkthrough.closeModal();
          break;
        default:
          return;}

      e.preventDefault();
    });
  });

}).call(this);

//# sourceURL=coffeescript
              
            
!
999px

Console