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

              
                
<figure class="snip1312">
  <div class="image"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/pr-sample11.jpg" alt="pr-sample11"/></div>
  <figcaption>
    <div class="date"><span class="day">28</span><span class="month">Oct</span></div>
    <h3>The World Ended Yesterday</h3>
    <p>
       
      You know what we need, Hobbes? We need an attitude. Yeah, you can't be cool if you don't have an attitude.
    </p>
    <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>
  </figcaption><a href="#"></a>
</figure>
<figure class="snip1312 hover">
  <div class="image"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/pr-sample10.jpg" alt="pr-sample10"/></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>
    <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>
  </figcaption><a href="#"></a>
</figure>
<figure class="snip1312">
  <div class="image"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/pr-sample13.jpg" alt="pr-sample13"/></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, because they don't have the slightest bearing on what happens to me anyway.
    </p>
    <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>
  </figcaption><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.snip1312 {
  font-family: 'Raleway', Arial, sans-serif;
  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.snip1312 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
}
figure.snip1312 img {
  max-width: 100%;
  vertical-align: top;
  position: relative;
}
figure.snip1312 figcaption {
  position: absolute;
  bottom: 15px;
  left: 15px;
  right: 15px;
  padding: 15px 15px 30px;
  background-color: #ffffff;
}
figure.snip1312 .date {
  background-color: #7f8c8d;
  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.snip1312 .date span {
  display: block;
  line-height: 24px;
}
figure.snip1312 .date .month {
  font-size: 14px;
  background-color: rgba(0, 0, 0, 0.1);
}
figure.snip1312 h3,
figure.snip1312 p {
  margin: 0;
  padding: 0;
}
figure.snip1312 h3 {
  min-height: 50px;
  margin-bottom: 10px;
  margin-left: 60px;
  display: inline-block;
  font-weight: 600;
  text-transform: uppercase;
}
figure.snip1312 p {
  font-size: 0.8em;
  margin-bottom: 20px;
  line-height: 1.6em;
}
figure.snip1312 footer {
  padding: 0 25px;
  background-color: #667273;
  color: #e6e6e6;
  font-size: 0.8em;
  line-height: 30px;
  text-align: right;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}
figure.snip1312 footer > div {
  display: inline-block;
  margin-left: 10px;
}
figure.snip1312 footer i {
  color: rgba(255, 255, 255, 0.2);
  margin-right: 5px;
}
figure.snip1312 a {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  position: absolute;
  z-index: 1;
}
figure.snip1312:hover img,
figure.snip1312.hover img {
  -webkit-transform: scale(1.15);
  transform: scale(1.15);
}
              
            
!

JS

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

              
            
!
999px

Console