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 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.

Quick-add: + add another resource

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.

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
Loading ..................

Console