cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmloctocatspinnerstartv

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="snip1534">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/pr-sample17.jpg" alt="pr-sample17" />
  <figcaption>
    <h3>Sir Cumference</h3>
    <h5>Design</h5>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip1534 hover"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/pr-sample18.jpg" alt="pr-sample18" />
  <figcaption>
    <h3>Alan Fresco</h3>
    <h5>Branding</h5>
  </figcaption>
  <a href="#"></a>
</figure>
<figure class="snip1534"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/pr-sample19.jpg" alt="pr-sample19" />
  <figcaption>
    <h3>Fig Nelson</h3>
    <h5>Photography</h5>
  </figcaption>
  <a href="#"></a>
</figure>
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Montserrat);
@import url(https://fonts.googleapis.com/css?family=Muli);
.snip1534 {
  font-family: 'Muli', sans-serif;
  position: relative;
  display: inline-block;
  overflow: hidden;
  margin: 10px 5px;
  min-width: 230px;
  max-width: 315px;
  width: 100%;
  color: #ffffff;
  text-align: left;
  font-size: 16px;
  background-color: #000000;
}

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

.snip1534 img {
  vertical-align: top;
  max-width: 100%;
  backface-visibility: hidden;
  -webkit-filter: grayscale(100%);
  filter: grayscale(100%);
  opacity: 0.75;
}

.snip1534 figcaption {
  z-index: 1;
  align-items: center;
  position: absolute;
  width: 100%;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: rgba(195, 86, 97, 0.85);
  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.2) 0%, transparent 100%);
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.2) 0%, transparent 100%);
  padding: 20px;
}

.snip1534 figcaption:before {
  content: '';
  width: 20px;
  height: 20px;
  background-color: #fff;
  bottom: 0;
  left: 50%;
  -webkit-transform: translate(-50%, 50%) rotate(45deg);
  transform: translate(-50%, 50%) rotate(45deg);
  position: absolute;
}

.snip1534 h3,
.snip1534 h5 {
  margin: 0;
  letter-spacing: 1px;
}

.snip1534 h3 {
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  font-weight: 400;
}

.snip1534 h5 {
  font-weight: normal;
}

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

.snip1534:hover > img,
.snip1534.hover > img {
  opacity: 1;
  -webkit-filter: grayscale(0%);
  filter: grayscale(0%);
}


/* 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