cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

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.

            
              <div class="long">
  <h1>Chris Coyier is my Hero&hellip;</h1>
  <blockquote>I just want to say that everything I know about WordPress, I’ve learned from Chris Coyier. He’s taught me a lot about semantic HTML and CSS, too.
    <footer>
      <cite>— <a href="http://designgeekess.com/sweet-site/chris-coyier-is-my-hero/">Niki</a></cite>
    </footer>
  </blockquote>

  <blockquote>Beyond a shadow of a doubt, my single biggest influence in web has been Mr. Chris Coyier, curator of CSS-Tricks. I know this, because there probably isn’t a single website that I’ve constructed since I found CSS-Tricks that hasn’t benefited from the use of something I gleaned from Chris’ website.

    <footer>
    <cite>— <a href="http://blog.duaneneveu.com/2239/my-web-hero-chris-coyier/">Duane Neveu</a></cite>
    </footer>
  </blockquote>

  <blockquote>
    &hellip;he has started some great projects, and for that he has been turned into a “Hero” to web developers and designers...
    <footer><cite>— <a href="http://blog.teamtreehouse.com/kill-your-heroes#comment-24176">Aaron Brewer</a></cite></footer>
  </blockquote>

  <blockquote>
    One of my favorite internet-famous people, Chris Coyier, just became even more of a hero to me.
    <footer><cite>— <a href="http://tinynow.com/blog/chris-coyier-hacker/">Matt</a></cite></footer>
  </blockquote>

  <blockquote>
    Whether he knows it or not, Chris Coyier has to be my CSS Yoda...If you’re out there Chris and you read this…Mucho, Mucho thanks for all that you do in the community. 
    <footer><cite>— <a href="http://blog.grayghostvisuals.com/developers/my-web-heros/">Dennis Gaebel</a></cite></footer>
  </blockquote>

  <hr />
  
  <blockquote>
    <footer>
      <a target="_blank" href="https://codepen.io/somethingkindawierd/pen/uhonc">Click here to view a solution to this scrolling problem using React mixins</a>
    </footer>
  </blockquote>
</div>
<div class="short-wrap scrollY">
  <div class="short">
    <div class="short-content">
      <p>Try scrolling me.</p>
      <p><strong>Desired Behavior</strong></p>
      <p>Once you scroll to the bottom scrolling
        should stop.</p>
      <p><strong>Actual Behavior</strong></p>
      <p>When you scroll to the bottom the background will start scrolling instead.</p>
    </div>
  </div>
</div>
            
          
!
            
              html, body, .app {
  height: 100%;
  position: relative;
  padding: 0;
  margin: 0;
}

body,
.scrollY {
  overflow-y: auto;
}

.long {
  min-height: 150%;
}

.short-wrap {
  position: fixed;
  top: 0;
  left: 0;
  height: 250px;
  width: 150px;
}
.short {
  width: 100%;
  min-height: 100%;
}

// Demo Styles
// -----------

@import url(https://fonts.googleapis.com/css?family=Abril+Fatface);
@import url(https://fonts.googleapis.com/css?family=Cardo:400,400italic);

h1 {
  font-family: 'Abril Fatface', cursive;
  font-size: 48px;
  color: #eee;
}

blockquote {
  font-family: 'Cardo', serif;
  font-size: 24px;
  font-style: italic;
  line-height: 32px;
  color: #ddd;
}

cite, 
a, 
a:active, 
a:hover {
  color: #888;
  font-style: normal;
  text-decoration: none;
}

.long {
  padding: 80px 180px;
  text-shadow: 0 0 3px #000;
  background: #333;
  background-image: url('https://dl.dropboxusercontent.com/u/14898/Photos/NSTexturedFullScreenBackgroundColor.png');
}

.short {
  color: #333;
  background: #ccc;
}

.short-content {
  font-family: Helvetica, sans-serif;
  padding: 24px 12px;
  margin: 0;
  
  p {
    margin: 0;
    padding: 0.5em 0;
  }
}
            
          
!
999px
🕑 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 ..................

Console