Pen Settings

HTML

CSS

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

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

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.

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="container" id="top">
  <div class="text-center"><a class="smoothScroll" href="#bottom">Click here to smooth scroll to the bottom of the page</a></div>
  <div class="jumbotron">
    <div class="row">
      <div class="col-m-12">
        <h1 class="text-primary text-center text-uppercase">Pippi Longstocking</h1>
        <h2 class="text-center text-uppercase">The girl who could lift a horse</h2>
        <div class="thumbnail"><image src="https://ichef.bbci.co.uk/images/ic/480x270/p01l5g0d.jpg">
          <div class="caption text-center">Nine-year-old Pippi was and is unconventional, assertive, and has <mark>superhuman strength</mark>, being able to lift her horse one-handed. She is playful and unpredictable. She frequently makes fun of unreasonable adult attitudes, especially when displayed by pompous and condescending adults.</div>
        </div>
        <div class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2">
          <h3 class="text-danger">Here's a time line of Pippi's life:</h3>
          <ul>
            <li><strong>1945</strong> - The first three Pippi <mark><abbr title="Yeah, she´s fictional, wish she was real...">chapter books</abbr></mark> were published in 1945–1948</li>
            <li><strong>1969</strong> - additional series of six <abbr title="I really like tool-tips">books</abbr> published in 1969–1975</li>
            <li><strong>1969</strong> - A Swedish Pippi Longstocking television series was created based on the books in 1968. The first episode was broadcast on Sveriges Radio TV in February 1969. The production was a Swedish-West German co-production and several German actors had roles in the series.</li>
            <li><strong>1979</strong> - Two final stories were printed in 1979 and 2000.</li>
            <li><strong>1988</strong> - An American feature film version from Columbia Pictures was released, directed by British veteran director Ken Annakin, starring Tami Erin as Pippi. While the title suggests a continuation, the film is in fact just a retelling of the original story.</li>  
            <li><strong>2015</strong> - Pippi appears on the obverse of the Swedish 20 kronor note. The note, released in October, also features a portrait of <abbr title="the author!">Astrid Lindgren</abbr>.</li> 
            <li><strong>Future</strong> - Never dies.</li>      
          </ul>
          <blockquote>
            <p class="text-danger">"Pipi's life and achievement are testimony to the far-reaching contribution that one girl's towering intellect, persistence and fabulous vision can make to human peace and anchovies."</p>
            <footer> Lurrr, ruler of the planet Omicron Persei 8.</footer>
          </blockquote>
          <h3><kbd>You really should read more about this incredible girl on her <a href="https://en.wikipedia.org/wiki/Pippi_Longstocking" target="_blank">Wikipedia entry.</a></kbd></h3>
        </div>
      </div>
    </div> 
  </div>
  <footer class="text-center">
    <hr>
    <p>Written and coded by <a href="https://www.freecodecamp.com/jolarti" target="_blank">Jiro Ghianni</a>.</p>
    <div id="bottom"><a class="smoothScroll" title="scroll to top" href="#top">Go to top of page ↑</a></div>
  </footer>  
</div>
              
            
!

CSS

              
                body {
  background-color: #fba69d;
  font-family: 'Raleway', Verdana, sans-serif;
  font-size: 1.8em;
  padding: 0 auto;
}

.jumbotron {
  margin-top: 3em;
  background-color: #fcbcb5;
  border-color: #FFF0F5;
  border-style: dashed; 
  border-width: 5px;
}

blockquote, .caption {
  background-color: #ffebcc;
}

kbd {
 /* margin: 0.5em;
  padding: 0.5em;*/
}
              
            
!

JS

              
                $(function() {
  // This will select the a-href tags with class smoothScroll 
  //All anchors that you want smooth scrolling you should attribute that class
  // This should prevent problems with carousel, scrollspy, etc...
  $('.smoothScroll').click(function() {
    if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
      var target = $(this.hash);
      target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
      if (target.length) {
        $('html,body').animate({
          scrollTop: target.offset().top
        }, 1000); // The number here represents the speed of the scroll in milliseconds
        return false;
      }
    }
  });
});

// Change the speed to whatever you want
// If 1000 is too much, try 800 or lower
              
            
!
999px

Console