cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <figure class="snip1552">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample91.jpg" alt="sample91" />
  <figcaption>
    <h3>Archibald Northbottom</h3>
    <p>I'm learning real skills that I can apply throughout the rest of my life ... Procrastinating and rationalizing.</p>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip1552 hover"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample96.jpg" alt="sample96" />
  <figcaption>
    <h3>Druid Wensleydale</h3>
    <p>If you do the job badly enough, sometimes you don't get asked to do it again.</p>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip1552"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample90.jpg" alt="sample90" />
  <figcaption>
    <h3>Indigo Violet</h3>
    <p>But Calvin is no kind and loving god! He's one of the old gods! He demands sacrifice! </p>
  </figcaption>
  <a href="#"></a>
</figure>
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro);
.snip1552 {
  font-family: 'Source Sans Pro', sans-serif;
  position: relative;
  display: inline-block;
  overflow: hidden;
  margin: 8px;
  min-width: 230px;
  max-width: 315px;
  width: 100%;
  color: #000000;
  text-align: left;
  font-size: 16px;
  background-color: #fff;
}

.snip1552 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.45s ease;
  transition: all 0.45s ease;
}

.snip1552 img {
  vertical-align: top;
  max-width: 100%;
  backface-visibility: hidden;
}

.snip1552 figcaption {
  position: absolute;
  top: 40px;
  bottom: 40px;
  left: 40px;
  right: 40px;
  z-index: 1;
  bottom: 0;
}

.snip1552 h3,
.snip1552 p {
  margin: 0;
  opacity: 0;
  letter-spacing: 1px;
}

.snip1552 h3 {
  -webkit-transform: translateY(-100%);
  transform: translateY(-100%);
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 5px;
}

.snip1552 p {
  font-weight: normal;
  font-style: italic;
  color: #888;
  font-size: 0.9em;
  padding-left: 15px;
  -webkit-transform: translateX(-25px);
  transform: translateX(-25px);
}

.snip1552 a {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

.snip1552:hover > img,
.snip1552.hover > img {
  opacity: 0.1;
}

.snip1552:hover h3,
.snip1552.hover h3,
.snip1552:hover p,
.snip1552.hover p {
  -webkit-transform: translateY(0);
  transform: translateY(0);
  opacity: 1;
}


/* Demo purposes only */

body {
  background-color: #212121;
  text-align: center;
}
            
          
!
            
              /* Demo purposes only */
$(".hover").mouseleave(
  function () {
    $(this).removeClass("hover");
  }
);

            
          
!
999px
Loading ..................

Console