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.

              <base href="https://css-tricks.github.com/AnythingSlider/demos/images/">
<ul id="slider">
    <img src="slide-civil-1.jpg" data-thumb="slide-civil-1.jpg" alt="" />
    <img src="slide-env-1.jpg" data-thumb="slide-env-1.jpg" />
    <img src="slide-civil-2.jpg" data-thumb="slide-civil-2.jpg" />
    <img src="slide-env-2.jpg" data-thumb="slide-env-2.jpg" />
              ul#slider {
  width: 680px;
  height: 317px;
  list-style: none;
  Adjust the left and right position to be about the same size as the
  outer wrapper padding (.anythingslider-metallic)
.prev-thumb, .next-thumb {
  display: none;
  position: absolute;
  width: 140px;
  height: 70px;
  left: 25px; /* adjust this as needed */
  background: #0355a3;
  top: 50%;
  margin-top: -35px;
.next-thumb {
  left: auto;
  right: 25px; /* adjust this as needed */
.prev-thumb img, .next-thumb img {
  width: 100px;
  height: 60px;
  margin: 5px;
.prev-thumb img {
  float: right;
.back:hover ~ .prev-thumb, .forward:hover ~ .next-thumb, .prev-thumb:hover, .next-thumb:hover {
  display: inline;
              $(function () {
  function updateThumbs(slider) {
    var prv = slider.targetPage - 1 < 0 ? slider.panels : slider.targetPage - 1,
    nxt = slider.targetPage + 1 > slider.panels - 1 ? 0 : slider.targetPage + 1;
    $('.prev-thumb img').attr('src', slider.$items.eq(prv).find('img').attr('data-thumb'));
    $('.next-thumb img').attr('src', slider.$items.eq(nxt).find('img').attr('data-thumb'));

  /* use slide_complete instead of slide_begin if you want the thumbs to change
  after the animation has completed, but the updating then won't match the
  default navigation styling
  $('#slider').on('initialized slide_begin', function(e, slider){
    if (!slider.$wrapper.find('.prev-thumb').length) {
      slider.$wrapper.append('<div class="prev-thumb"><img/></div><div class="next-thumb"><img/></div>');

  /* initialize the slider */
    theme: 'metallic'


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