Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

HTML

              
                <header role="banner">
	<h1>Bootstrap 4 Alpha - Responsive Flexbox Cards</h1>
</header>

<div class="container-fluid">
  <div class="row">
    <div class="card-deck">
      <div class="card">
        <img class="card-img-top" src="//placehold.it/720x350" alt="Card image cap">
        <div class="card-block">
          <h4 class="card-title">Card title</h4>
          <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
          <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
        </div>
      </div>
      <div class="card">
        <img class="card-img-top" src="//placehold.it/720x350" alt="Card image cap">
        <div class="card-block">
          <h4 class="card-title">Card title</h4>
          <p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p>
          <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
        </div>
      </div>
      <div class="card">
        <img class="card-img-top" src="//placehold.it/720x350" alt="Card image cap">
        <div class="card-block">
          <h4 class="card-title">Card title</h4>
          <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p>
          <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
        </div>
      </div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                body { background: #eee }

.container-fluid { max-width: 1200px; }

header {
	background: #563d7c;
	padding: 2em 1em;
	color: #fff;
	margin-bottom: 2em;
	h1 {
		font-weight: 200;
	}
}

.card {
	background: #fff;
	box-shadow: 0 3px 10px rgba(0,0,0,0.1);
	img {
		width: 100%;
	}
}

[class*="row"] {
	margin-bottom: 1em;
  justify-content: center;
}

[class*="col-"] {
	background: #efefef;
	border: 1px solid #ddd;
	padding-top: .75rem;
	padding-bottom: .75rem;
	width: 100%;
}


              
            
!

JS

              
                /* flexbox grid is optional in BS4 */
              
            
!
999px

Console