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

              
                <figure class="snip1253">
  <div class="image"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample52.jpg" alt="sample52"/></div>
  <figcaption>
    <div class="date"><span class="day">28</span><span class="month">Oct</span></div>
    <h3>The World Ended Yesterday</h3>
    <p>
      I don't need to compromise my principles, they don't have the slightest bearing on what happens to me anyway.
    </p>
  </figcaption>
  <footer>
    <div class="views"><i class="ion-eye"></i>2,907</div>
    <div class="love"><i class="ion-heart"></i>623</div>
    <div class="comments"><i class="ion-chatboxes"></i>23</div>
  </footer><a href="#"></a>
</figure>
<figure class="snip1253 hover">
  <div class="image"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample66.jpg" alt="sample66"/></div>
  <figcaption>
    <div class="date"><span class="day">17</span><span class="month">Nov</span></div>
    <h3>An Abstract Post Heading</h3>
    <p>
      Sometimes the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.
    </p>
  </figcaption>
  <footer>
    <div class="views"><i class="ion-eye"></i>1,870</div>
    <div class="love"><i class="ion-heart"></i>973</div>
    <div class="comments"><i class="ion-chatboxes"></i>85</div>
  </footer><a href="#"></a>
</figure>
<figure class="snip1253">
  <div class="image"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample59.jpg" alt="sample59"/></div>
  <figcaption>
    <div class="date"><span class="day">01</span><span class="month">Dec</span></div>
    <h3>Down with this sort of thing</h3>
    <p>
      I don't need to compromise my principles, they don't have the slightest bearing on what happens to me anyway.
    </p>
  </figcaption>
  <footer>
    <div class="views"><i class="ion-eye"></i>928</div>
    <div class="love"><i class="ion-heart"></i>198</div>
    <div class="comments"><i class="ion-chatboxes"></i>23</div>
  </footer><a href="#"></a>
</figure>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Raleway:400,600,700);
@import url(https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css);
figure.snip1253 {
  font-family: 'Raleway', Arial, sans-serif;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin: 10px;
  min-width: 250px;
  max-width: 310px;
  width: 100%;
  background-color: #ffffff;
  color: #000000;
  text-align: left;
  font-size: 16px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
}
figure.snip1253 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
}
figure.snip1253 .image {
  max-height: 220px;
  overflow: hidden;
}
figure.snip1253 img {
  max-width: 100%;
  vertical-align: top;
  position: relative;
}
figure.snip1253 figcaption {
  margin: -40px 15px 0;
  padding: 15px ;
  position: relative;
  background-color: #ffffff;
}
figure.snip1253 .date {
  background-color: #2980b9;
  top: 15px;
  color: #fff;
  left: 15px;
  min-height: 48px;
  min-width: 48px;
  position: absolute;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
}
figure.snip1253 .date span {
  display: block;
  line-height: 24px;
}
figure.snip1253 .date .month {
  font-size: 14px;
  background-color: rgba(0, 0, 0, 0.1);
}
figure.snip1253 h3,
figure.snip1253 p {
  margin: 0;
  padding: 0;
}
figure.snip1253 h3 {
  min-height: 50px;
  margin-bottom: 10px;
  margin-left: 60px;
  display: inline-block;
  font-weight: 600;
  text-transform: uppercase;
}
figure.snip1253 p {
  font-size: 0.8em;
  margin-bottom: 20px;
  line-height: 1.6em;
}
figure.snip1253 footer {
  padding: 0 25px;
  background-color: #20638f;
  color: #e6e6e6;
  font-size: 0.8em;
  line-height: 30px;
  text-align: right;
}
figure.snip1253 footer > div {
  display: inline-block;
  margin-left: 10px;
}
figure.snip1253 footer i {
  color: rgba(255, 255, 255, 0.2);
  margin-right: 5px;
}
figure.snip1253 a {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  z-index: 1;
}
figure.snip1253:hover img,
figure.snip1253.hover img {
  -webkit-transform: scale(1.15);
  transform: scale(1.15);
}

              
            
!

JS

              
                  /* Demo purposes only */
  $(".hover").mouseleave(
    function () {
      $(this).removeClass("hover");
    }
  );
              
            
!
999px

Console