css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="container">

  <div class="intro-item">
    <h2>Canyon House</h2>
    <p>
      A private residence based on a complex three-dimensional map of interlocking space types.
      This commission involved the renovation of a building which itself has several additions dating back to the 1960s. Located inside the Appia Antica Park on the outskirts of Rome, the building serves as the clients’ main residence, and is a space both for work and relaxation.
    </p>
    <p>
      The design uses vertical axes to section <a href="#" id="show-canyon-house">the building</a> into different space types including service areas, distribution areas, main quarters and outdoor areas, establishing a specific spatial and functional sequence as the owners move throughout the building.
    </p>
    <p>
      In addition, the horizontal sequence of floor levels differentiates zones for sleeping, living and work. These horizontal and vertical planes create a three-dimensional map for the house and its functions.
    </p>
  </div>

  <div class="intro-item">
    <h2>Italpromo &amp; Libardi Associati Headquarters</h2>
    <p>
      A new headquarters for the well&dash;known Italian communications agency Italpromo &amp; Libardi Associati in a converted school building in Ostiense, Rome.
    </p>
    <p>
      Ostiense is one of the few remaining industrial areas on the edge of Rome’s historic city centre and is currently undergoing extensive architectural and social regeneration. The brief for <a href="#" id="show-italpromo">this project</a> was to transform an existing building without losing its unique character and retaining its original listed façade.
    </p>
    <p>
      Labics’ main objective was to introduce new functions into the shell of the existing building, creating innovative ways of using the space based on the complex spatial, functional and social relationships within the contemporary workplace. The aim was to find the right balance between individual and shared spaces, between production and social areas.
    </p>
  </div>

</div>
            
          
!
            
              body {
  background: #000; 
  color: #fff;
}

body .container {
  margin: 40px auto; 
  width: 360px; 
  padding: 0 20px;
}

.container a,
.container a:visited {
  color: #aaa; 
  border-bottom: 1px solid #aaa;
  text-decoration: none;
}

.container a:focus,
.container a:hover,
.container a:active {
  color: #fff; 
  border-bottom: 0;
}

.intro-item {
  margin-bottom: 70px;
}

.intro-item h2 {
  text-align: center; 
  font-size: 18px; 
  text-transform: uppercase; 
  margin-bottom: 10px;
}

.intro-item p { 
  font-family: Times, serif; 
  font-size: 20px; 
  line-height: 25px; 
  text-indent: 25px; 
  margin: 0;
}


/***************************/ 
/* plugin overwrite styles */
/***************************/
.sl-index-overlay,
.sl-lightbox-overlay {
  background: #000;
  opacity: 1;
}

/* we change the item overlay to a white and reduce
the opacity to 0.4 */
.sl-index-item-overlay {
  background: #fff;
  opacity: 0.4;
}

/* the index caption should be black, half transparent
with the text aligned to the left and have a top/bottom
padding */
.sl-index-item-caption {
  background: #000;
  padding: 10px 0;
  color: #fff;
  text-align: left;
  opacity: 0.7;
}

/* change the link color for the lightbox captions */
.sl-lightbox-caption-container a,
.sl-lightbox-caption-container a:visited {
  color: #fff;
}
.sl-lightbox-caption-container a:hover {
  border: 0; color: #aaa;
}

/* we over extend the left and right arrows, so that
navigation outside of the lightbox container is
also possible */
.sl-lightbox-cursor.left {
  left: -50%;
  width: 100%;
}

.sl-lightbox-cursor.right {
  right: -50%;
  width: 100%;
}

/**** white cursors ****/
/* index module */
.sl-index-wrapper {
  cursor: url('https://www.scalable-lightbox.com/assets/cursors/white/cursor-close.png'), url('https://www.scalable-lightbox.com/assets/cursors/white/cursor-close.cur'), crosshair;
}

.sl-index-item-indicator {
  background: url('https://www.scalable-lightbox.com/assets/cursors/white/loader.gif') top left no-repeat;
  background-size: 16px 16px;
}

.lt-ie9 .sl-index-item-indicator {
  background: url('https://www.scalable-lightbox.com/assets/cursors/white/loader-small.gif') top left no-repeat;
}

/* lightbox module */
.sl-lightbox-wrapper {
  cursor: url('https://www.scalable-lightbox.com/assets/cursors/white/cursor-close.png'), url('https://www.scalable-lightbox.com/assets/cursors/white/cursor-close.cur'), crosshair;
}

.sl-lightbox-item-indicator {
  background: url('https://www.scalable-lightbox.com/assets/cursors/white/loader.gif') top left no-repeat;
  background-size: 16px 16px;
}

.lt-ie9 .sl-lightbox-item-indicator {
  background: url('https://www.scalable-lightbox.com/assets/cursors/white/loader-small.gif') top left no-repeat;
}

.sl-lightbox-cursor {
  background: url('https://www.scalable-lightbox.com/assets/cursors/white/blank.gif') 0 0 repeat;
}

.sl-lightbox-cursor.left {
  cursor: url('https://www.scalable-lightbox.com/assets/cursors/white/cursor-left.png'), url('https://www.scalable-lightbox.com/assets/cursors/white/cursor-left.cur'), w-resize;
}

.sl-lightbox-cursor.right {
  cursor: url('https://www.scalable-lightbox.com/assets/cursors/white/cursor-right.png'), url('https://www.scalable-lightbox.com/assets/cursors/white/cursor-right.cur'), e-resize;
}

/* retina optimization */
@media (min-resolution: 192dpi), (-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2), (-o-min-device-pixel-ratio: 2/1), (min-device-pixel-ratio: 2), (min-resolution: 2dppx) {

  .sl-index-wrapper,
  .sl-lightbox-wrapper {
    cursor: url('https://www.scalable-lightbox.com/assets/cursors/white/cursor-close-retina.png'), crosshair;
  }

  .sl-lightbox-cursor.left {
    cursor: url('https://www.scalable-lightbox.com/assets/cursors/white/cursor-left-retina.png'), w-resize;
  }
  .sl-lightbox-cursor.right {
    cursor: url('https://www.scalable-lightbox.com/assets/cursors/white/cursor-right-retina.png'), e-resize;
  }

}
            
          
!
            
              $(function() {

  // initialize ScalableLightbox
  $.ScalableLightbox({
    // show what's happening in
    // the debugger console
    debug:        true,

    // define the path for all
    // resources (images):
    baseImgPath:  'https://www.scalable-lightbox.com/assets/img/lightbox/',

    // define data structure via API
    api:          'https://www.scalable-lightbox.com/assets/api/data.json',

    // index module setting
    index: {
      // set index layout to masonry
      layout:     "masonry",
      thumb: {
        // use the number caption (default),
        // change the number format and
        // position it on the top
        caption:          "number",
        captionNumberFmt: "Image %n%",
        captionPosition:  "top"
      }
    },

    // lightbox module setting
    lightbox: {
      img: {
        // we display the number in the left
        // caption and change the number format
        captionLeft:            "number",
        captionNumberFmt:       "%n% of %total%",
        // we do not use a caption in the center
        captionCenter:          "none",
        // we use the link to the index module
        // on the right and change the link text
        captionRight:           "index",
        captionIndexTxt:        "Back to Overview",
        // we position the caption container on
        // top, as we did in the index module
        captionPosition:        "above",
        captionVerticalMargin:  10
      }
    }
  });



  // open the index module via the
  // aforementioned text links
  $("#show-canyon-house").click(function(e) {

    // prevent the default anchor behavior
    e.preventDefault();

    // open the lightbox module
    $.ScalableLightbox("open", { module: "index", deck: 1 });

  });

  $("#show-italpromo").click(function(e) {

    // prevent the default anchor behavior
    e.preventDefault();

    // open the lightbox module
    $.ScalableLightbox("open", { module: "index", deck: 2 });

  });

});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console