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.

            
              <h1>CSS Sliding Caption Reveal</h1>
<h2>Hover over Bill for different directions</h2>
<div class="screenshot">
  <img src="http://fillmurray.com/300/200">
  <div class="screenshot-caption screenshot-caption_top">
    <h1>Top to Bottom</h1>
    <a href="#">Read More</a>
  </div>
</div>
  
<div class="screenshot">
  <img src="http://fillmurray.com/300/200">
  <div class="screenshot-caption screenshot-caption_topRight">
    <h1>Top Right to Bottom Left</h1>
    <a href="#">Read More</a>
  </div>
</div>
    
 <div class="screenshot">
  <img src="http://fillmurray.com/300/200">
  <div class="screenshot-caption screenshot-caption_right">
    <h1>Left to Right</h1>
    <a href="#">Read More</a>
  </div>
</div>
      
 <div class="screenshot">
  <img src="http://fillmurray.com/300/200">
  <div class="screenshot-caption screenshot-caption_bottomRight">
    <h1>Bottom Right to Top Left</h1>
    <a href="#">Read More</a>
  </div>
</div>
         
 <div class="screenshot">
  <img src="http://fillmurray.com/300/200">
  <div class="screenshot-caption screenshot-caption_bottom">
    <h1>Bottom to Top</h1>
    <a href="#">Read More</a>
  </div>
</div>

 <div class="screenshot">
  <img src="http://fillmurray.com/300/200">
  <div class="screenshot-caption screenshot-caption_bottomLeft">
    <h1>Bottom Left to Top Right</h1>
    <a href="#">Read More</a>
  </div>
</div>
   
<div class="screenshot">
  <img src="http://fillmurray.com/300/200">
  <div class="screenshot-caption screenshot-caption_left">
    <h1>Left to Right</h1>
    <a href="#">Read More</a>
  </div>
</div>
  
  <div class="screenshot">
  <img src="http://fillmurray.com/300/200">
  <div class="screenshot-caption screenshot-caption_topLeft">
    <h1>Top Left to Bottom Right</h1>
    <a href="#">Read More</a>
  </div>
</div>
            
          
!
            
              @import "compass/css3";


h1, h2 {
  text-align:center;
  color:#2c3e50;
}

.screenshot {
  float: left;
  margin: 50px;
  position: relative;
  overflow: hidden;
}

.screenshot > * { display: block; }

.screenshot-caption {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(44,62,80,.4);
  color: #ffffff;
  -webkit-transition: all 0.5s ease-out;
  -moz-transition: all 0.5s ease-out;
  transition: all 0.5s ease-out;
  
  h1 {
    color: white;
  }

  a {
    display: table;
    margin: 0 auto; 
    text-align: center;
    background: #2c3e50;
    padding: 6px 12px;
    color: white;
    text-decoration: none;
  }
}

.screenshot-caption > * {
  -webkit-transition: opacity 1s ease;
  -moz-transition: opacity 1s ease;
  transition: opacity 1s ease;
  opacity: 0;
}

.screenshot-caption_top {
  top: -100%;
  left: 0;
}
.screenshot-caption_topRight {
  top: -100%;
  left: 100%;
}
.screenshot-caption_right {
  top: 0;
  left: 100%;
}
.screenshot-caption_bottomRight {
  top: 100%;
  left: 100%;
}
.screenshot-caption_bottom {
  top: 100%;
  left: 0;
}
.screenshot-caption_bottomLeft {
  top: 100%;
  left: -100%;
}
.screenshot-caption_left {
  top: 0;
  left: -100%;
}
.screenshot-caption_topLeft {
  top: -100%;
  left: -100%;
}

.screenshot:hover .screenshot-caption {
  top: 0;
  left: 0;
  -webkit-transition: all 0.25s ease-out;
  -moz-transition: all 0.25s ease-out;
  transition: all 0.25s ease-out;
}

.screenshot:hover .screenshot-caption > * {
  -webkit-transition: opacity 1s ease;
  -moz-transition: opacity 1s ease;
  transition: opacity 1s ease;
  opacity: 1;
 
}


            
          
!
999px
Loading ..................

Console