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>CSS-based loading incidcator for Magnific Popup</h2>
<a href="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a3/Christmas_flood_1717.jpg/1280px-Christmas_flood_1717.jpg" class="with-caption image-link">
  <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a3/Christmas_flood_1717.jpg/1280px-Christmas_flood_1717.jpg" width="172" height="105" />  

<p>Style of loading indicator from: http://tobiasahlin.com/spinkit/</p>

.mfp-preloader {
  width: 30px;
  height: 30px;
  background-color: #FFF;
  opacity: 0.65;
  margin: 0 auto;
  -webkit-animation: rotateplane 1.2s infinite ease-in-out;
  animation: rotateplane 1.2s infinite ease-in-out;

@-webkit-keyframes rotateplane {
  0% { -webkit-transform: perspective(120px) }
  50% { -webkit-transform: perspective(120px) rotateY(180deg) }
  100% { -webkit-transform: perspective(120px) rotateY(180deg)  rotateX(180deg) }

@keyframes rotateplane {
  0% { transform: perspective(120px) rotateX(0deg) rotateY(0deg) }
  50% { transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg) }
  100% { transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg) }

		type: 'image',
		closeBtnInside: false,
    closeOnContentClick: true,
  tLoading: '', // remove text from preloader
  /* don't add this part, it's just to disable cache on image and test loading indicator */
  callbacks: {
    beforeChange: function() {
     this.items[0].src = this.items[0].src + '?=' + Math.random(); 

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