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

Quick-add: + add another resource

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.

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.

            
              <h2>fancyBox v3.2 - Images</h2>

<h3>Single images</h3>

<p>
  Add a <code>data-fancybox</code> attribute to any link to enable fancyBox.
</p>

<p class="imglist">
  <a href="https://source.unsplash.com/0JYgd2QuMfw/1500x1000" data-fancybox data-caption="This image has a caption">
      <img src="https://source.unsplash.com/0JYgd2QuMfw/240x160" />
  </a>
  
  <a href="https://source.unsplash.com/xAgvgQpYsf4/1500x1000" data-fancybox>
      <img src="https://source.unsplash.com/xAgvgQpYsf4/240x160" />
  </a>
</p>

<p>
  It is also possible to display close button in the top right corner.
</p>

<p class="imglist">
  <a href="https://source.unsplash.com/R261qkc-nDE/1500x1000" data-fancybox data-toolbar="false" data-small-btn="true">
      <img src="https://source.unsplash.com/R261qkc-nDE/240x160" />
  </a>
</p>

<h3>Image gallery</h3>

<p>
  Galleries are created by adding the same <code>data-fancybox</code> attribute value.
</p>

<p class="imglist">
  
  <a href="https://source.unsplash.com/eWFdaPRFjwE/1500x1000" data-fancybox="images">
      <img src="https://source.unsplash.com/eWFdaPRFjwE/240x160" />
  </a>
  
  <a href="https://c1.staticflickr.com/9/8148/29324593462_abebaddc38_k.jpg" data-fancybox="images">
      <img src="https://c1.staticflickr.com/9/8148/29324593462_f890687b7a_m.jpg" />
  </a>

  <a href="https://c2.staticflickr.com/6/5499/30972532232_051e1dc57e_h.jpg" data-fancybox="images">
      <img src="https://c2.staticflickr.com/6/5499/30972532232_e9a298a0c5_m.jpg" />
  </a>

  <a href="https://source.unsplash.com/i2KibvLYjqk/1500x1000" data-fancybox="images">
      <img src="https://source.unsplash.com/i2KibvLYjqk/240x160" />
  </a>
  
  <a href="https://source.unsplash.com/cZVthlrnlnQ/1500x1000" data-fancybox="images">
      <img src="https://source.unsplash.com/cZVthlrnlnQ/240x160" />
  </a>
  
  <a href="https://source.unsplash.com/vddccTqwal8/1500x1000" data-fancybox="images">
      <img src="https://source.unsplash.com/vddccTqwal8/240x160" />
  </a>
</p>


<h3>Gallery with one preview image</h3>

<p>
  To show only one or a few images but have a large gallery, simply hide the rest of the links. <br />
  Optionally, use <code>data-thumb</code> for thumbnail image.
</p>

<p>
    <a href="https://c1.staticflickr.com/1/357/31876784275_12286240d4_h.jpg" data-fancybox="images-preview">
      <img src="https://c1.staticflickr.com/1/357/31876784275_fbc9696913_m.jpg" />
    </a>
</p>

<div style="display: none;">
  
  <a href="https://farm1.staticflickr.com/582/32752534825_4b35b2df81_o_d.jpg" data-fancybox="images-preview"
     data-thumb="https://farm1.staticflickr.com/582/32752534825_c25321a594_m_d.jpg"></a>
  
  <a href="https://farm3.staticflickr.com/2859/33395734202_522f9d8efd_k_d.jpg" data-fancybox="images-preview"
     data-thumb="https://farm3.staticflickr.com/2859/33395734202_15a81c4ef3_m_d.jpg"></a>
  
</div>

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

Console