Pen Settings



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


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


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.


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.


                <!-- Header -->
<header class="banner">
  <span class="background"></span>
  <h1>Ken Burns Banner</h1>

<!-- Other stuff -->
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ut enim lorem. Aenean consectetur magna quam, ac pharetra velit molestie vitae. Donec eros nisi, condimentum in nunc eget, rutrum faucibus orci. Aenean lacinia augue vel blandit ultricies. Quisque aliquet dui egestas consectetur aliquet. Etiam semper interdum sodales. Donec vehicula arcu rutrum nisi malesuada tincidunt convallis vitae magna. Nam in tortor commodo, molestie ligula vitae, volutpat justo.</p>
    <p>Phasellus velit lectus, sagittis vitae nunc sit amet, elementum convallis nibh. Donec urna purus, faucibus a turpis a, blandit eleifend sem. Vivamus blandit, felis eu sodales cursus, elit mauris iaculis enim, quis volutpat purus massa in sapien. Fusce a enim felis. Aliquam in nulla leo. Aliquam at lacinia lectus. Nunc imperdiet dui in tortor tincidunt rutrum. Etiam porttitor metus convallis, ornare nisl a, interdum nisl. Integer lacinia quis enim nec ultrices. Mauris eget ante magna. Vestibulum volutpat adipiscing lorem et dignissim. Suspendisse sed semper ligula. Donec consequat auctor luctus. Quisque sodales, ipsum id facilisis cursus, lectus purus tincidunt massa, eu mollis odio odio ac dui. Suspendisse potenti.</p>
    <p>Nam vitae ante in augue ultrices volutpat in non turpis. Ut mattis tellus vitae condimentum sagittis. Aenean porta nisi nulla, et sagittis odio consectetur vestibulum. Proin convallis felis ut nunc aliquam auctor. Praesent aliquet ut dui fermentum viverra. Curabitur tincidunt diam tellus, aliquet porttitor nisl accumsan ut. Fusce tincidunt lorem sit amet arcu porta consequat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse potenti. Maecenas aliquet neque a risus euismod faucibus. Aenean sit amet velit bibendum, iaculis orci in, interdum sem.
    <p>Phasellus sed tortor eget odio eleifend congue non eu felis. Praesent cursus vehicula bibendum. Sed lacinia eget erat a mattis. Nulla et nisl nulla. Phasellus ac nisl augue. Sed erat quam, iaculis consectetur ante quis, imperdiet fermentum magna. Vivamus porttitor quis mi ac volutpat. Etiam libero nibh, varius id luctus sit amet, facilisis convallis erat. Nulla facilisi.</p>


                /* Better box-sizing */
* { box-sizing: border-box; }

/* 1rem = 10px */
html { font-size: 62.5%; }

/* Default body */
body { 
  margin: 0; 
  opacity: 0;
  font: 1.6rem/1.875 'Avenir Next', sans-serif;

/* Loaded body */
body.loaded {
  opacity: 1;
  transition: 1s opacity;

/* Default banner */
.banner {
  position: relative;
  width: 100%;
  height: 40rem;
  padding: 0 5%;
  overflow: hidden;
  backface-visibility: hidden;

/* Default image container */
.banner .background {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  transform: translate3d(0,0,0) scale(1.25);
  background: black url( no-repeat center center; 
  background-size: cover;

/* Loaded image container */
.loaded .banner .background {
  transform: scale(1);
  transition: 6.5s transform;

/* Other stuff */
.banner h1 {
  color: #EEE;
  margin: 0;
  line-height: 40rem;
  text-transform: uppercase;
  text-shadow: 0 0 .3rem black;

main { 
  width: 90%;
  margin: 5rem auto;

main p { margin: 0 0 3rem 0; }


                // Trigger class name on load
window.onload = function() {
  document.body.className += ' loaded'