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.

              <div class="container" >
  <h1 class="trigger">Hover over me to fetch an image</h2>
  <span data-original="http://www.fillmurray.com/200/200"></span>
              .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #ccc;
  border-radius: 2px;
  margin: 2em auto;
  max-width: 45em;
  &:hover {
    cursor: pointer;

span {
  width: 200px;
  height: 200px;
  background: hsl(0, 80%, 80%);

.trigger {
  font-family: 'Roboto Condensed';
  margin-left: auto;
  margin-right: auto;
  &:hover {
    cursor: pointer;
              $(document).ready(function($) {
  $('.trigger').hover(function() {
   // find our span
   var elem = $(this).siblings('span');
    // get our img url
   var src = elem.attr('data-original');
    // change span to img using the value from data-original
   elem.replaceWith('<img src="' + src + '"/>');
Loading ..................