startv

DyCzF

A Pen By Captain Anonymous

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
via CSS Lint

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
via JS Hint

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Want a Run Button?

If active, the preview will update automatically when you change code.

HTML

            
              <div class="wrap">
  <div class="box"><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p></div>
  <div class="photo red">
  <div class="overlay"><p>Howdy Partner!</p></div>
  </div>
</div>

<div class="wrap">
  <div class="box"><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p></div>
  <div class="photo green">
  <div class="overlay"><p>Howdy Partner!</p></div>
  </div>
</div>

<div class="wrap">
  <div class="box"><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p></div>
  <div class="photo blue">
  <div class="overlay"><p>Howdy Partner!</p></div>
  </div>
</div>

<div class="wrap">
  <div class="box"><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p></div>
  <div class="photo orange">
    <div class="overlay"><p>Howdy Partner!</p></div>
  </div>
</div>
            
          
!

CSS

            
              .wrap {
  width:20%; 
  position:relative;
  float:left;
  margin-left:20px;
}
.box {
  padding:10px;
}
.photo {
  position:absolute;
  width:100%;
  height:100%;
  top:0;
  transition:opacity .5s linear;
  -moz-transition:opacity .5s linear;
  -webkit-transition:opacity .5s linear;
  border:3px solid black;
}
.photo:hover {
  opacity:0;
  transition:opacity .5s linear;
  -moz-transition:opacity .5s linear;
  -webkit-transition:opacity .5s linear;
}
.overlay {
  position:absolute;
  bottom:0;
  width:100%;
  text-align:center;
  background-color:rgba(0,0,0,.5);
  color:#fff;
}
.red {
  background-color:red;
}
.green {
  background-color:green;
}
.orange {
  background-color:orange;
}
.blue {
  background-color:blue;
}
            
          
!

JS

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

Console