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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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="snip1536">
  <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample13.jpg" alt="sample13" />
  <figcaption>
    <p>Which is worse, that everyone has his price, or that the price is always so low.</p>
    <h3>Graphic Design</h3>
  </figcaption>
  <div class="hover"></div><i class="ion-android-add"></i>
  <a href="#"></a>
</figure>
<figure class="snip1536 hover"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample21.jpg" alt="sample21" />
  <figcaption>
    <p>I'm killing time while I wait for life to shower me with meaning and happiness.</p>
    <h3>Web Development</h3>
  </figcaption>
  <div class="hover"></div><i class="ion-android-add"></i>
  <a href="#"></a>
</figure>
<figure class="snip1536"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sample73.jpg" alt="sample73" />
  <figcaption>
    <p>The only skills I have the patience to learn are those that have no real application in life. </p>
    <h3>Online Marketing</h3>
  </figcaption>
  <div class="hover"></div><i class="ion-android-add"></i>
  <a href="#"></a>
</figure>
            
          
!
            
              @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,800);
@import url(https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css);
.snip1536 {
  background-color: #000000;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
  color: #ffffff;
  display:inline-block;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6em;
  margin: 10px 1%;
  max-width: 310px;
  min-width: 250px;
  overflow: hidden;
  position: relative;
  text-align: left;
  width: 100%;
}

.snip1536 * {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.25s ease;
  transition: all 0.25s ease;
}

.snip1536 img {
  max-width: 100%;
  opacity: 0.75;
  position: relative;
  vertical-align: top;
}

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

.snip1536 h3 {
  -webkit-transform: translateY(100%);
  transform: translateY(100%);
  background-color: #000000;
  bottom: 0;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 0;
  padding: 10px 20px;
  position: absolute;
  width: 100%;
}

.snip1536 p {
  padding: 0px 20px;
  opacity: 0;
  -webkit-transition-delay: 0.15s;
  transition-delay: 0.15s;
}

.snip1536 i {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 54px;
  -webkit-transform: translate(-50%, -50%) scale(1);
  transform: translate(-50%, -50%) scale(1);
}

.snip1536 .hover {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  align-items: center;
  background-color: rgba(236, 188, 46, 0.75);
  display: flex;
  font-size: 65px;
  justify-content: center;
  opacity: 0;
}

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

.snip1536:hover .hover,
.snip1536.hover .hover {
  opacity: 1;
}

.snip1536:hover p,
.snip1536.hover p {
  opacity: 1;
}

.snip1536:hover h3,
.snip1536.hover h3 {
  -webkit-transform: translateY(0%);
  transform: translateY(0%);
}

.snip1536:hover i,
.snip1536.hover i {
  -webkit-transform: translate(-50%, -50%) scale(0.1);
  transform: translate(-50%, -50%) scale(0.1);
  opacity: 0;
}


/* Demo purposes only */

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

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console