Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <ul class="pagination">
  <li>
    <span>
      <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/154/image3.png" />
    </span>
  </li>
  <li>
    <span>
      <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/154/image2.png" />
    </span>
  </li>
  <li>
    <span>
      <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/154/image1.png" />
    </span>
  </li>
</ul>

<small>Illustrations: <a href="http://pixabay.com/en/toy-monster-fantasy-strange-576520/">1</a> · <a href="http://pixabay.com/en/toy-monster-fantasy-stone-scary-576514/">2</a> · <a href="http://pixabay.com/en/toy-monster-fantasy-stone-beige-576495/">3</a></small>

<!-- Not required for demo -->
<div class="ild-ident">
  
  <!-- "IL" logo Copyright (c) Ian Lunn Design Limited 2015 -->
  <a href="https://codepen.io/IanLunn/" target="_blank" title="Ian Lunn">
    
    <svg onmouseenter="el=this;el.classList.add('active');setTimeout(function(){el.classList.remove('active')},600);" xmlns="http://www.w3.org/2000/svg" width="52" height="52" viewBox="0 0 52 52">
      <g class="circle-holder">
	      <path class="circle" fill="#2E96D6" d="M5.4 26c0-11.4 9.2-20.6 20.6-20.6s20.6 9.2 20.6 20.6c0 11.4-9.2 20.6-20.6 20.6s-20.6-9.2-20.6-20.6zm-5.4 0c0 14.4 11.6 26 26 26s26-11.6 26-26-11.6-26-26-26-26 11.6-26 26z"/>
      </g>
	    <path class="i" fill="#fff" d="M15 22h9v16h-9v-16z"/>
	    <path class="l" fill="#fff" d="M28 14h9v24h-9v-24z"/>
    </svg>
  </a>
</div>
              
            
!

CSS

              
                @keyframes showThumbnail {
  16.65%,
  83.35% {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(10px);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
}

body {
  background: #92BE96;
}

small {
  position: absolute;
  top: 0;
  right: 0;
  padding: 1em;
  color: white;
  text-align: center;
  font-family: sans-serif;
}

a {
  color: white;
}

.pagination {
  position: relative;
  top: 20px;
  text-align: center;
  
  li {
    cursor: pointer;
    list-style: none;
    display: inline-block;
    width: 16px;
    height: 16px;
    margin: 0 4px;
    border: solid 2px white;
    border-radius: 100%;
    transition-duration: .25s;
    transition-property: background;

    &:hover {
      background: white;
      
      span {
        /* Show the tooltip when hovered over */
        animation-name: showThumbnail;
        animation-fill-mode: forwards;
        animation-duration: 3s;
      }
    }
    
    span {
      /* Thumbnail */
      display: inline-block;
      pointer-events: none;
      position: absolute;
      top: 100%;
      margin-top: 16px;
      padding: 8px;
      background: white;
      opacity: 0;
      visibility: hidden;
      transform: translateX(-50%) translateY(-10px);

      &:after {
        /* Thumbnail Tip */
        content: "";
        position: absolute;
        z-index: 1;
        top: -6px;
        left: 50%;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 0 6px 6px 6px;
        border-color: transparent transparent white transparent;
        margin-left: -4px;
      }
    }
  }
}


@keyframes circle {
  50% {
    transform: scale(1.26923077);
  }
}

@keyframes initials {
  50% {
    transform: translateY(-8px) translateZ(0);
  }
}

.ild-ident {
  position: absolute;
  right: 20px;
  bottom: 20px;
  
  svg {
    overflow: visible;
    transform: translateZ(0);

    .circle-holder {
      transform: translate(-7px, -7px);
    }

    .circle {
      transform: translate(7px, 7px);
      fill: #2A7831;
    }

    &.active {
      .i {
        animation: initials .4s ease-in-out;
      }

      .l {
        animation: initials .4s .2s ease-in-out;
      }

      .circle {
        animation: circle .5s .1s ease-in-out;
      }
    }
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console