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

              
                <div class="slider">
  <div class="slidercontainer">
    <ul id="sliderul">
      <li class="slidercontent"> "Un service gratuit qui rapporte plus que l’offre bancaire !"
        <span>Philippe V. – Chef d’Entreprise</span> </li>
      <li class="slidercontent"> "J’ai été parfaitement accompagné par WSI CONSEIL" <span>Cédric G. – Trésorier d’une Association</span> </li>
      <li class="slidercontent"> "Grâce à son indépendance, WSI CONSEIL est précieux pour identifier parmi les offres bancaires les meilleurs rendements à Court, Moyen et Long Terme." <span>Thierry S. – Dirigeant</span> </li>
      <li class="slidercontent"> "De très bons professionnels, j’ai été particulièrement bien conseillé." <span>Pierre-Luc F. – Président de PME</span> </li>
      <li class="slidercontent"> "Le cabinet WSI CONSEIL a su nous trouver les meilleures solutions pour placer notre trésorerie excédentaire.<br />Un Grand Merci à eux." <span>Marie L. – Directrice Financière Association</span> </li>
      <li class="slidercontent"> "Sérieux, professionnalisme, disponibilité et gentillesse à toutes les étapes du projet ! Je recommande vivement ce cabinet" <span>Marc G. – Radiologue</span> </li>
      <li class="slidercontent"> "Un expert financier à l’écoute de nos besoins. Nous avons élaborer ensemble une offre sur-mesure." <span>Mélanie M. – DAF</span> </li>

    </ul>
  </div>
</div>
              
            
!

CSS

              
                .slider {
  min-height: 150px;
  width: 100%;
  max-width: 460px;
  margin: 0 auto 1rem;
  background: transparent url(https://i.postimg.cc/Vvzy7zTY/guaranted.png) 10px
    10px no-repeat;
  padding-top: 50px;
  border: 3px solid #b59e5c;
  -webkit-border-radius: 15px;
  -moz-border-radius: 15px;
  border-radius: 15px;
  box-sizing: border-box;
  font-family: verdana;
}

.slidercontainer {
  width: 80%;
  margin: 0 10%;
}

#sliderul {
  width: 100%;
  list-style-type: none;
  text-align: center;
  padding: 0;
  line-height: 24px;
  display: inline-block;
  margin: 0;
}

.slidercontent {
  margin: 0;
  font-size: 16px;
  color: #1d1f20;
  display: none;
  width: 100%;
}

.slidercontent span {
  font-size: 18px;
  display: block;
  margin: 10px 0 20px;
  color: #343436;
}

              
            
!

JS

              
                (function($) {
  $.fn.quoteSlide = function(options) {
    // This is the easiest way to have default options.
    var settings = $.extend(
      {
        // These are the defaults.
        duration: 3000,
        height: 200,
        verticalCenter: 0 // experimental...
      },
      options
    );

    var current = 1,
      slides = this.find("li"),
      max = slides.length + 1;

    if (1 === settings.verticalCenter) {
      slides
        .each(function() {
          if ($(this).height() > settings.height) {
            settings.height = $(this).height();
          }
        })
        .each(function() {
          $(this).css(
            "margin",
            (settings.height - $(this).height()) / 2 + "px 0"
          );
        });
    }

    this.css("min-height", settings.height + "px")
      .find(".slidercontent:nth-child(1)")
      .fadeIn("slow");

    // Change to next quote
    var changeIt = setInterval(function() {
      slides.hide();
      current += 1;
      if (current === max) {
        current = 1;
      }
      $(".slidercontent:nth-child(" + current + ")").fadeIn("slow");
    }, settings.duration);

    return this;
  };
})(jQuery);

jQuery(document).ready(function($) {
  $(".slider").quoteSlide({ duration: 5000 });
});

              
            
!
999px

Console