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.

            
              <div class="container">
   <div class="row">
      <div class="col-xs-6">
         <div class="th-hover th-hover--from-left">
            <img class="img-responsive th-hover__image" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/24181/mountain01.jpg" alt="">
            <div class="th-hover__overlay">
               <h2 class="th-hover__title">Advanced CSS selectors</h2>
               <p class="th-hover__meta" href="#">June 17th, 2016</p>
               <p class="th-hover__link">
                  <a href="#">Read More</a>
               </p>
            </div>
         </div>
         <div class="info-bar">
            <h3>Parallax Slide from Left</h3>
         </div>
      </div>
      <div class="col-xs-6">
         <div class="th-hover th-hover--from-right">
            <img class="img-responsive th-hover__image" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/24181/mountain02.jpg" alt="">
            <div class="th-hover__overlay">
               <h2 class="th-hover__title">:not() pseudo class</h2>
               <p class="th-hover__meta" href="#">June 16th, 2016</p>
               <p class="th-hover__link">
                  <a href="#">Read More</a>
               </p>
            </div>
         </div>
         <div class="info-bar">
            <h3>Parallax Slide from Right</h3>
         </div>
      </div>
   </div>
   <div class="row">
      <div class="col-xs-6">
         <div class="th-hover th-hover--from-top">
            <img class="img-responsive th-hover__image" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/24181/mountain03.jpg" alt="">
            <div class="th-hover__overlay">
               <h2 class="th-hover__title">Podcasts for Front-end developers</h2>
               <p class="th-hover__meta" href="#">June 15th, 2016</p>
               <p class="th-hover__link">
                  <a href="#">Read More</a>
               </p>
            </div>
         </div>
         <div class="info-bar">
            <h3>Parallax Slide from Top</h3>
         </div>
      </div>
      <div class="col-xs-6">
         <div class="th-hover th-hover--from-bottom">
            <img class="img-responsive th-hover__image" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/24181/mountain04.jpg" alt="">
            <div class="th-hover__overlay">
               <h2 class="th-hover__title">The usecases of conenteditable</h2>
               <p class="th-hover__meta" href="#">June 14th, 2016</p>
               <p class="th-hover__link">
                  <a href="#">Read More</a>
               </p>

            </div>
         </div>
         <div class="info-bar">
            <h3>Parallax Slide from Bottom</h3>
         </div>
      </div>
   </div>
</div>
            
          
!
            
              @import 'bourbon';
@import url('https://fonts.googleapis.com/css?family=PT+Sans:400,700');

body {
   font-family: 'PT Sans', sans-serif;
   margin-top: 50px;
   background: #000;
}

.info-bar {
   padding: 20px 0;
   position: relative;

   h3 {
      font-size: 16px;
      margin: 0;
      color: #fff;
   }
}

.th-hover {
   position: relative;
   overflow: hidden;
   box-shadow: 0 0 10px rgba(0,0,0,0.25);
   backface-visibility: hidden;
   
   &::before {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      z-index: 20;
      box-shadow: 0 0 0 0 #fff inset;
      transition: 0.3s;
      pointer-events: none;
   }
   
   &:hover {
      
      .th-hover__overlay:after {
         transform: translateY(0);
         transition: 0.3s 0.1s;
      }
      
      .th-hover__image {
         transform: scale(1.1, 1.1) rotate(3deg) translateZ(0);
         transition: 0.1s 0.2s linear;
         backface-visibility: hidden;
      }
      
      .th-hover__title {
         transform: translateX(0);
         transition: 0.3s;
      }
      
      .th-hover__meta {
         transform: translateX(0);
         transition: 0.3s 0.2s;
      }
      
      .th-hover__link {
         transform: translateX(0);
         transition: 0.3s 0.4s;
      }
   }
}

.th-hover__overlay {
   position: absolute;
   left: 40px;
   right: 40px;
   bottom: 40px;
   
   &::after {
      content: '';
      display: block;
      position: absolute;
      top: -40px;
      right: -40px;
      bottom: -40px;
      left: -40px;
      @include linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.7));
      z-index: 5;
      transform: translateY(100%);
      transition: 0.3s;
   }
}

.th-hover__image {
   transition: 0.3s;
   transform: scale(1.05, 1.05);
}

.th-hover__title {
   backface-visibility: hidden;
   color: #fff;
   z-index: 10;
   font-size: 38px;
   position: relative;
   transition: 0.3s;
   text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
   font-weight: 700;
}

.th-hover__meta {
   backface-visibility: hidden;
   color: rgba(255, 255, 255, 0.8);
   z-index: 10;
   position: relative;
   transition: 0.3s;
   text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
   margin-bottom: 20px;
   text-transform: uppercase;
   
   a {
      color: #ff0000;
   }
}

.th-hover__link {
   transition: 0.3s;
   z-index: 10;
   position: relative;
   backface-visibility: hidden;
   margin-bottom: 0;
   
   a {
      display: inline-block;
      padding: 10px 16px;
      text-transform: uppercase;
      font-size: 13px;
      color: #EC177A;
      border-radius: 2px;
      background: #fff;
      font-weight: 700;
      transition: .2s;
      
      &:hover,
      &:focus,
      &:active {
         text-decoration: none;
         color: #fff;
         background: #EC177A;
         transition: .2s;
      }
   }
   
}

// From left

.th-hover--from-left {
   .th-hover__title {
      transform: translateX(-100vh);
   }
   
   .th-hover__meta {
      transform: translateX(-100vh);
   }
   
   .th-hover__link {
      transform: translateX(-100vh);
   }
}

// From right

.th-hover--from-right {
   .th-hover__title {
      transform: translateX(100vh);
   }
   
   .th-hover__meta {
      transform: translateX(100vh);
   }
   
   .th-hover__link {
      transform: translateX(100vh);
   }
}

// From top

.th-hover--from-top:hover {  
   .th-hover__title {
      transform: translateY(0);
      transition: 0.3s 0.4s;
   }

   .th-hover__meta {
      transform: translateY(0);
      transition: 0.3s 0.2s;
   }

   .th-hover__link {
      transform: translateY(0);
      transition: 0.3s;
   }
}

.th-hover--from-top {
   .th-hover__title {
      transform: translateY(-100vh);
   }
   
   .th-hover__meta {
      transform: translateY(-100vh);
   }
   
   .th-hover__link {
      transform: translateY(-100vh);
   }
}


// From bottom

.th-hover--from-bottom:hover {  
   .th-hover__title {
      transform: translateY(0);
      transition: 0.3s;
   }

   .th-hover__meta {
      transform: translateY(0);
      transition: 0.3s 0.2s;
   }

   .th-hover__link {
      transform: translateY(0);
      transition: 0.3s 0.4s;
   }
}

.th-hover--from-bottom {
   .th-hover__title {
      transform: translateY(100vh);
   }
   
   .th-hover__meta {
      transform: translateY(100vh);
   }
   
   .th-hover__link {
      transform: translateY(100vh);
   }
}
            
          
!
999px
Loading ..................

Console