css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

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.

              <div class="container">
  <a href="#" id="c-go-top" class="c-go-top">
    <i class="fa fa-arrow-up fa-fw"></i>

  <h1>To the Top!</h1>
  <p><strong>Scroll down and the button will appear on the bottom right corner.</strong></p>

  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus venenatis volutpat ligula, sed porta purus rutrum non. Morbi laoreet mattis dolor, ut lobortis purus maximus sit amet. Morbi pulvinar ultrices scelerisque. Nunc rhoncus odio in dolor porttitor, et ullamcorper metus pharetra. Proin ullamcorper leo purus, eget lobortis quam elementum ac. Quisque eget augue ligula. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed dapibus leo eget sodales imperdiet.</p>

  <p>In vel lobortis purus. Morbi non dolor nec risus commodo varius. Aliquam id neque a lectus auctor efficitur nec ut velit. Duis a varius dui. Proin semper nisl sed malesuada convallis. In viverra, enim suscipit dictum venenatis, libero diam pretium erat, quis fringilla justo ante a orci. Nullam a ligula posuere odio fermentum finibus. Sed non nibh ex. Fusce et leo nec erat vulputate ornare. Sed suscipit pretium placerat. Vestibulum luctus pellentesque neque, quis viverra erat dignissim vitae. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;</p>

  <p>Ut id nisi rutrum velit auctor aliquam vitae sed magna. Fusce et efficitur ante. Quisque vitae nulla et magna gravida lobortis ut eget augue. Nullam eleifend, ipsum et feugiat viverra, orci lacus mollis diam, vitae luctus turpis orci ut nisl. Quisque vitae posuere massa, fermentum laoreet arcu. Donec luctus nisl ut finibus finibus. Suspendisse bibendum turpis turpis, volutpat tempus metus lobortis et. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aenean lacinia molestie vulputate. Ut consectetur fermentum cursus. Mauris porta libero ac urna mattis dapibus. Phasellus pretium turpis vitae sagittis pretium.</p>

  <p>Morbi iaculis porttitor semper. Sed pretium a est efficitur efficitur. Morbi quis nisi mollis dolor porttitor sodales nec nec justo. Duis tincidunt faucibus elit. Fusce ornare nec massa in ullamcorper. Integer aliquam, ligula sit amet ultrices pharetra, ex libero fringilla nibh, nec lobortis dui magna ut leo. Phasellus in placerat ipsum, commodo volutpat mi. Fusce id vestibulum magna. Fusce ut convallis nisi, rhoncus euismod ligula. Quisque et diam elit.</p>

  <p>In quis magna malesuada, interdum nisl non, maximus dui. Sed hendrerit consequat eleifend. Suspendisse nec commodo nulla, vel scelerisque velit. Phasellus interdum nec magna eu ornare. In dictum lorem sem, vitae hendrerit lorem tempus accumsan. In nec leo tortor. Maecenas non magna odio. Aliquam finibus id nunc sit amet molestie. Aenean sagittis orci ut convallis sollicitudin. Praesent vehicula mi a est lacinia cursus.</p>
              body {
  background-color: #eee;

.c-content {
  padding: 20px;

.c-go-top {
  background: none repeat scroll 0 0 padding-box #1099dd;
  bottom: 20px;
  border: 1px solid #1099dd;
  border-radius: 4px;
  color: #eee;
  display: none;
  font-size: 12px;
  opacity: 0.8;
  padding: 10px;
  position: fixed;
  right: 90px;
  text-decoration: none;
  z-index: 999;

.c-go-top:visited {
  color: #fff;
  outline: 0;
  text-decoration: none;
              $(function() {
  // Amount of scrolling before button is shown/hidden.
  var offset = 100;

  // Fade duration
  var duration = 500;

  // Toggle view of button when scrolling.
  $(window).scroll(function() {
    if ($(this).scrollTop() > offset) {
    } else {

  // Scroll to top when button is clicked.
  $('#c-go-top').click(function(event) {
    $('html, body').animate({
      scrollTop: 0
    }, duration);
    return false;
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................