cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

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="snip1548"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample114.jpg" alt="sample114"/>
  <figcaption>
    <h3>Benjamin Evalent</h3>
    <h5>Design</h5>
  </figcaption><a href="#"></a>
</figure>
<figure class="snip1548 hover"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample116.jpg" alt="sample116"/>
  <figcaption>
    <h3>Sheq Bivouac</h3>
    <h5>Branding</h5>
  </figcaption><a href="#"></a>
</figure>
<figure class="snip1548"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample115.jpg" alt="sample115"/>
  <figcaption>
    <h3>Ruby Von Rails</h3>
    <h5>Photography</h5>
  </figcaption><a href="#"></a>
</figure>
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Raleway);
.snip1548 {
  font-family: 'Raleway', sans-serif;
  position: relative;
  display: inline-block;
  overflow: hidden;
  margin: 10px 8px;
  min-width: 230px;
  max-width: 315px;
  width: 100%;
  color: #ffffff;
  font-size: 16px;
  text-align: left;
}
.snip1548 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.25s ease;
  transition: all 0.25s ease;
}
.snip1548:before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 10px;
  right: 10px;
  bottom: 100%;
  content: '';
  background-color: rgba(51, 51, 51, 0.9);
  -webkit-transition: all 0.25s ease;
  transition: all 0.25s ease;
  -webkit-transition-delay: 0.25s;
  transition-delay: 0.25s;
}
.snip1548 img {
  vertical-align: top;
  max-width: 100%;
  backface-visibility: hidden;
}
.snip1548 figcaption {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.snip1548 h3,
.snip1548 h5 {
  margin: 0;
  opacity: 0;
  letter-spacing: 1px;
}
.snip1548 h3 {
  -webkit-transform: translateY(100%);
  transform: translateY(100%);
  text-transform: uppercase;
  font-weight: 400;
  -webkit-transition-delay: 0.05s;
  transition-delay: 0.05s;
  margin-bottom: 5px;
}
.snip1548 h5 {
  font-weight: normal;
  background-color: #ae895d;
  padding: 3px 10px;
  -webkit-transform: translateY(100%);
  transform: translateY(100%);
  -webkit-transition-delay: 0s;
  transition-delay: 0s;
}
.snip1548 a {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
}
.snip1548:hover:before,
.snip1548.hover:before {
  bottom: 10px;
  -webkit-transition-delay: 0s;
  transition-delay: 0s;
}
.snip1548:hover h3,
.snip1548.hover h3,
.snip1548:hover h5,
.snip1548.hover h5 {
  -webkit-transform: translateY(0);
  transform: translateY(0);
  opacity: 1;
}
.snip1548:hover h3,
.snip1548.hover h3 {
  -webkit-transition-delay: 0.2s;
  transition-delay: 0.2s;
}
.snip1548:hover h5,
.snip1548.hover h5 {
  -webkit-transition-delay: 0.3s;
  transition-delay: 0.3s;
}
/* Demo purposes only */
body {
  background-color: #212121;
  text-align: center;
}

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

            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console