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.

              <a href="https://dl.dropboxusercontent.com/u/3307294/mfp/test-image.jpg" title="Test caption" class="image-link">Has Retina image</a>

<a href="http://www.polyxostudios.de/wp-content/uploads/2012/07/IMG_2588-bearbeitet2-900x602.jpg" title="Test caption" class="image-link">No Retina image</a>

Name of retina image should end with @2x, e.g: 
  type: 'image',

  retina: {

    ratio: 2, // Increase this number to enable retina image support.
	    // Image in popup will be scaled down by this number.
	    // Option can also be a function which should return a number (in case you support multiple ratios). For example:
	    // ratio: function() { return window.devicePixelRatio === 1.5 ? 1.5 : 2  }
	    replaceSrc: function(item, ratio) {
	    function checkRetina(url) {
	    var retinasyntax = '';
	             url: url,
	             async: false,
	             type: "HEAD",
				   function() {
				    retinasyntax = '@2x';
	           return retinasyntax;
	   	possibleRetina = item.src.replace(/\.\w+$/, function(m) { return '@2x' + m; });
	    existingratio = checkRetina(possibleRetina);
	    return item.src.replace(/\.\w+$/, function(m) { return existingratio + m; });
	    } // function that changes image source


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