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

              
                <nav>
  <a href="#Home">Home</a>
  <a href="#About">About</a>
  <a href="#Features">Features</a>
  <a href="#ContactUs">Contact Us</a>
</nav>

<div class="content">
  <section id="Home">
    <h3>Home</h3>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt nemo eveniet repellendus dicta cum quas veniam! Quod, possimus. Ullam eum aspernatur quis sequi, at, laudantium doloremque nulla voluptatum ducimus debitis molestiae, cupiditate fuga magni commodi maiores harum accusamus repudiandae amet suscipit autem labore minus ad. Ipsam eligendi, repellat voluptatem nostrum veniam at sapiente minima vero iure, esse architecto vel perferendis eveniet nemo vitae cupiditate laboriosam quas omnis quidem! Laudantium, perferendis explicabo commodi, non fugit sit! Laborum deleniti illo ratione voluptates. Dignissimos quo non maxime autem delectus ex minus voluptas veritatis esse ea, repellendus, ratione repellat fuga enim explicabo dolor tempore?
  </section>
  <section id="About">
    <h3>About</h3>
  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quia repudiandae nostrum quae unde voluptatibus adipisci, ipsa, consequuntur, explicabo ullam quo iusto fugit, nemo ex totam. Omnis temporibus incidunt libero reiciendis illo mollitia rem odit nam pariatur voluptates ratione fugiat officiis similique, quia magni, molestias nihil exercitationem perspiciatis repudiandae iste. Natus!
  </section>
  <section id="Features">
    <h3>Features</h3>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt nemo eveniet repellendus dicta cum quas veniam! Quod, possimus. Ullam eum aspernatur quis sequi, at, laudantium doloremque nulla voluptatum ducimus debitis molestiae, cupiditate fuga magni commodi maiores harum accusamus repudiandae amet suscipit autem labore minus ad. Ipsam eligendi, repellat voluptatem nostrum veniam at sapiente minima vero iure, esse architecto vel perferendis eveniet nemo vitae cupiditate laboriosam quas omnis quidem! Laudantium, perferendis explicabo commodi, non fugit sit! Laborum deleniti illo ratione voluptates. Dignissimos quo non maxime autem delectus ex minus voluptas veritatis esse ea, repellendus, ratione repellat fuga enim explicabo dolor tempore?
  </section>
  <section id="ContactUs">
    <h3>Contact Us</h3>
  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quia repudiandae nostrum quae unde voluptatibus adipisci, ipsa, consequuntur, explicabo ullam quo iusto fugit, nemo ex totam. Omnis temporibus incidunt libero reiciendis illo mollitia rem odit nam pariatur voluptates ratione fugiat officiis similique, quia magni, molestias nihil exercitationem perspiciatis repudiandae iste. Natus!
  </section>
</div>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800);

@mixin animation($animation) {
  -webkit-animation: $animation;
  -moz-animation: $animation;
  animation: $animation;
}
@mixin keyframes($name, $name1) {
  @-webkit-keyframes #{$name} {
    @content;
  }
  @-moz-keyframes #{$name} {
    @content;
  }
  @-ms-keyframes #{$name} {
    @content;
  }
  @keyframes #{$name} {
    @content;
  }
}

/* demo styles */

@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800);
body {
  background-color: #2c3e50;
  padding: 50px;
  color: #fff;
  text-align: center;
  font-family: 'Open Sans', sans-serif;
  vertical-align: middle;
  line-height: 1.555;
}

h3 {
  font-size: 20px;
  margin-top: 0;
  margin-bottom: 10px;
}

::-webkit-input-placeholder{
  color: #3e7b77;
  text-transform: uppercase;
}
::-moz-placeholder {  /* Firefox 19+ */
  color: #3e7b77;
  text-transform: uppercase; 
}
/* end styles */

nav{
  font-size: 0;
  display: inline-block;
  margin-bottom: 15px;
  a{
    display: inline-block;
    background-color: #fff;
    padding: 10px 20px;
    font-size: 14px;
    color: #fb3c3c;
    font-weight: 600;
    text-decoration: none;
    margin: 0 1px;
    border-bottom: solid 3px #fb3c3c;
  }
}
.content{
  width: 400px;
  color: #fff;
  font-size: 14px;
  margin: auto;
  text-align: justify;
  section{
    margin-bottom: 20px;
    padding: 10px;
  }
}

section:target{
  background-color: rgba(#fff, 0);
  border-left: solid 5px orange;
  @include animation(bgColor 1s linear );
}

@include keyframes(bgColor, bgColor animation) {
  0%{
    background-color: rgba(#fff, .8);
  }
  100%{
    background-color: rgba(#fff, 0);
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console