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

              
                <div class="container">
<div class="row">
   <div class="col-sm-12 col-md-6 featured-container">
     <div class="card featured">
     </div>
  </div>
  <div class="col-sm-12 col-md-6">
    <div class="card sub-featured">
    <h2>This is a heading</h2>
      <p>Nunc tincidunt euismod mi at dapibus. Donec eu leo gravida, venenatis diam et, convallis nulla. Donec pharetra sem non ex semper tempus. In volutpat, diam non vestibulum scelerisque, purus magna egestas ante, in tincidunt lorem metus ut lectus. Sed eu tincidunt nisl, </p>
    </div>
  </div>
  <div class="col-sm-6 col-md-3">
    <div class="card non-featured">
    <h2>Category</h2>
    </div>
  </div>
  <div class="col-sm-6 col-md-3">
    <div class="card non-featured accent">
    <h2>This is a heading</h2>
    </div>
  </div>
</div>
</div>
              
            
!

CSS

              
                body {
  padding-top: 120px;
  padding-bottom: 220px;
}

.card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  transition: all 0.2s ease-in-out;
}

.featured {
  height: 90vh;
  background-image: url(https://snap-photos.s3.amazonaws.com/img-thumbs/960w/J98HWXTPPV.jpg);
  background-size: cover;
  background-position: 50%;
  min-height: 414px;
  opacity: 0.8;
}

.sub-featured {
  height: 49vh;
  margin-bottom: 5vh;
  min-height: 226px;
  max-height: 326px;
}

.sub-featured h2 {
  font-size: 1.2em;
}

.non-featured {
  height: 36vh;
  min-height: 167px;
}

.card {
  background-color: #efefef;  
  padding: 10px 15px;
  position: relative;
}

.non-featured h2 {
  font-size: 1.1em;
  position: absolute;
  bottom: 5px;
}

.accent {
  background-color: #33a2ae;
  background-image: url(https://snap-photos.s3.amazonaws.com/img-thumbs/960w/0UR6B61LVN.jpg);
  background-position: 50%;
  opacity: 0.9;
}

@media screen and ( max-width: 992px ) {
  .col-md-6 {
    margin-bottom: 5vh;
  }
  
  .sub-featured {
    margin-bottom: 0vh;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console