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

              
                <article class="card">
  <div class="card__wrapper">

    <figure class="card__feature">
      <img src="https://www.dropbox.com/s/z7gp2vanse5djxf/waves.jpg?raw=1" class="card__img" alt="waves" width="275" height="240">
    </figure>

    <div class="card__box">

      <header class="card__item card__header">
        <h6 class="card__item card__item--small card__label">Featured</h6>
        <h2 class="card__item card__item--small card__title">Blue Ocean Waves Crash</h2>
      </header>

      <hr class="card__item card__divider">

      <section class="card__item card__body">
        <p>See the beautiful oceans of the Pacific coast where the water is so clean you can see the sand.</p>
      </section>

    </div>

  </div>
</article>

<article class="card">
  <div class="card__wrapper">

    <figure class="card__feature">
      <img src="https://www.dropbox.com/s/r06tebu17sjfcca/bridge.jpg?raw=1" class="card__img" alt="Bridge" width="275" height="240">
    </figure>

    <div class="card__box">

      <header class="card__item card__header">
        <h6 class="card__item card__item--small card__label">Featured</h6>
        <h2 class="card__item card__item--small card__title">Long Exposure River Bridge</h2>
      </header>

      <hr class="card__item card__divider">

      <section class="card__item card__body">
        <p>Long exposure photography is when you leave the shutter open longers than usual to pick up more light.</p>
      </section>

    </div>

  </div>
</article>

              
            
!

CSS

              
                /* Block */
.card {
  width: 275px;

  font-family: 'Playfair Display', serif;
  text-align: center;

  transition: all .125s;
  transform: scale(1) translateY(0px);
}

/* Elements */
.card__wrapper {
  padding-top: .1px;
  padding-bottom: .1px;
  position: relative;

  background-color: #ffffff;
  color: #999999;
  box-shadow: 0 0 5px 0 rgba(0,0,0,.05);
}
.card__wrapper:after {
  content: '';
  position: absolute;
  z-index: -1;
  top: 15px;
  right: 15px;
  bottom: 0;
  left: 15px;

  box-shadow: 0 5px 15px 0 rgba(0,0,0,.2);
  transition: all .125s;
  transform: scale(1) translateY(0px);
}
.card__box {
  padding-right: 35px;
  padding-left: 35px;
  margin-top: 25px;
  margin-bottom: 25px;
}
.card__item  {
  margin-top: 20px;
  margin-bottom: 20px;
}
.card__item--small  {
  margin-top: 10px;
  margin-bottom: 10px;
}
.card__feature {
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
}
.card__img {
  display: block;
  max-width: 100%;
  height: 240px;
  width: 275px;
}
.card__header {
  position: relative;
  z-index: 1;
}
.card__title {
  color: #222222;

  font-size: 30px;
  font-weight: 400;
  line-height: 1.25;
}
.card__label {
  color: #cccccc;

  font-family: 'Montserrat', sans-serif;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .2em;
}
.card__divider {
  display: block;
  width: 100%;
  height: 15px;

  border: none;
  background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyOHB4IiBoZWlnaHQ9IjE1cHgiIHZpZXdCb3g9IjAgMCAyOCAxNSIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjggMTUiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGZpbGw9IiNERURFREUiIGQ9Ik0yNy41LDdoLTZDMjEuMiwzLjEsMTgsMCwxNCwwUzYuOCwzLjEsNi41LDdoLTZDMC4yLDcsMCw3LjIsMCw3LjVTMC4yLDgsMC41LDhoNmMwLjMsMy45LDMuNSw3LDcuNSw3czcuMi0zLjEsNy41LTdoNkMyNy44LDgsMjgsNy44LDI4LDcuNVMyNy44LDcsMjcuNSw3eiBNMTQsMWMzLjQsMCw2LjIsMi42LDYuNSw2SDcuNUM3LjgsMy42LDEwLjYsMSwxNCwxeiBNMTQsMTRjLTMuNCwwLTYuMi0yLjYtNi41LTZoMTIuOUMyMC4yLDExLjQsMTcuNCwxNCwxNCwxNHoiLz48L3N2Zz4=);
  background-repeat: no-repeat;
  background-position: center center;
}
.card__body {
  font-size: 12px;
  line-height: 1.75;
}

/* Modifiers */
.card:hover {
  cursor: pointer;
  transform: scale(1.05);
}
.card:hover .card__wrapper {
  box-shadow: 0 0 10px 0 rgba(0,0,0,.05);
}
.card:hover .card__wrapper:after {
  transform: scale(0.95) translateY(10px);
}

/* Demo */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #e9ebea;
  text-align: center;
}
.card {
  display: inline-block;
  margin-top: calc( ( 100vh - 506px ) / 2 );
  margin-right: 15px;
  margin-left: 15px;
  top: 50%;
}
              
            
!

JS

              
                
              
            
!
999px

Console