cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmloctocatspinnerstartv

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

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

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.

            
              <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<h1>Hovers from <a target="_blank" href="http://www.popagency.com/">pop</a></h1>

<a href="#" class="box">
  <h2><span>Breaking news -</span> hippos are sorta dangerous</h2>
  <h3>Tonight at nine</h3>
	<div class="box-more">
	<p>Read more</p>
	</div>
</a>
<a href="#" class="box">
  <h2><span>Lunch -</span> is delicious anytime</h2>
  <h3>Even after dinner</h3>
	<div class="box-more">
	<p>Read more</p>
	</div>
</a>
<a href="#" class="box">
  <h2><span>Wakka wakka -</span> ehhhhhh wakka wakka</h2>
  <h3>honk honk</h3>
	<div class="box-more">
	<p>Read more</p>
	</div>
</a>
<a href="#" class="box">
  <h2><span>Thin gray lines -</span> the new thick black lines</h2>
  <h3>you heard it here</h3>
	<div class="box-more">
	<p>Read more</p>
	</div>
</a>
            
          
!
            
              @import url(http://fonts.googleapis.com/css?family=Merriweather);

* {
  box-sizing: border-box;
}

body {
  font-family: 'Merriweather', serif;
  padding: 50px;
}

a {
  color: #f06d06;
  text-decoration: none;
}

   
.box {
  padding: 2em;
  border: 1px solid #ccc;
  display: block;
  width: 40%;
  height: 300px;
  float: left;
  margin: -1px 0 0 -1px;
  color: black;
  background: linear-gradient(
     white, white 50%, #333 50%, #333
  );
  background-size: 100% 202%;
  transition: all 0.2s ease;
  position:relative;
  overflow:hidden;
}
 
.box h2 {
  letter-spacing: -1.5px;
  line-height: 1.2;
}
.box h3 {
  font: 0.8em "Lucida Grande", serif;
}

.box:hover {
  background-position: 100% 100%;
  animation: up-bump 0.4s ease;

}
.box:hover h2 {
  color: #48ad26;
}
.box:hover h2 span {
  color: white;
}
.box:hover h3 {
  color: #999;
}
.bump-down{animation: down-bump 0.4s ease;}


.box:hover .box-more {
  top: 80%;
}


@keyframes up-bump {
  0% { padding-top: 2em; }
  50% { padding-top: 1.5em; }
  100% { padding-top: 2em; }

}
@keyframes down-bump {
  0% { padding-top: 2em; }
  50% { padding-top: 2.5em; }  
  100% { padding-top: 2em; }
}


.box-more {
position:absolute;
background:#fafafa;
color:#686868;
top:100%;
left:32px;
padding:10px;
transition: all 0.2s ease;
}
            
          
!
            
              $(function(){
  $(".box").mouseout(function(){
    $(this).addClass("bump-down");
  });
});
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console