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 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.

  <img src="http://placehold.it/230x300">
  <!-- the hover effect --> 
  <div class="shown-when-hover">
      This is visible when hovering over it.
              a .shown-when-hover {
  /* Display none, overridden when the a is hovered over */
  display: none;
  /* Absolute positioning to make it fill out every bit
  of the containing link */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Slightly transparent background so the picture shows */
  background: rgba(0, 0, 0, 0.5);

a:hover .shown-when-hover {
  /* display block when the link is being hovered over */
  display: block; 

a { 
  /* These three are important for containing the hover */
  display: block;
  position: relative;
  overflow: hidden;
  /* These two are the dimension of the image, to contain
  the hover effect*/
  width: 230px;
  height: 300px;
Loading ..................