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

              
                <header>
  <div class="container">Company</div>
</header>

<div id="background-video" class="va-container">
  <video autobuffer loop muted autoplay poster="image.jpg">
    <source type="video/mp4" src="http://s3media.squarespace.com/home-page-winter-2016/product-supercut.mp4">
  </video>

  <div class="container va-content">
    <h1>Lorem Ipsum dolor</h1>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eum est, non atque vel quisquam.</p>
  </div>
</div>

<div class="container">
  <h2>Dolor sit amet</h2>
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Officia iure consequatur laborum deserunt consequuntur ex fugiat quos nam enim minima, porro qui, facilis nobis debitis assumenda tempore nostrum laboriosam itaque?</p>

  <h3>Consectetur</h3>
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Molestiae consequatur voluptates porro et nemo.</p>

  <h3>Corporis</h3>
  <p>Laboriosam culpa corporis unde quasi qui ipsa, magnam odio possimus neque eaque sunt rem harum.</p>
</div>
              
            
!

CSS

              
                body,html{
  width:100%;height:100%;margin:0; padding:0;
}
header{
  position:absolute;
  width:100%;
  padding:15px;
  z-index:1;
  
  background-color:rgba(0,0,0,.3);
  color:#fff;
}
#background-video{
  width: 100%;height:450px;
  position:relative;
  overflow:hidden;
  background-color:#000;
  color:white;
}
#background-video video{
  position:absolute;
  width:100%;height:100%;
  top:0;left:0;
  object-fit:cover;
  pointer-events:none;
  opacity:.7;
}
.va-container {
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  transform-style: preserve-3d;
}
.va-content {
  position: relative;
  top: 40%;
  -webkit-transform: translateY(-40%);
  -ms-transform: translateY(-40%);
  transform: translateY(-40%);
  
  text-align: center;
}

              
            
!

JS

              
                
              
            
!
999px

Console