Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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="swiper">
  <div class="swiper-wrapper">
    <div class="swiper-slide">
      <img
        src="https://junpei-sugiyama.com/wp-content/uploads/2021/01/dog01.jpg"
        alt=""
      />
    </div>
    <div class="swiper-slide">
      <img
        src="https://junpei-sugiyama.com/wp-content/uploads/2021/01/dog02.jpg"
        alt=""
      />
    </div>
    <div class="swiper-slide">
      <img
        src="https://junpei-sugiyama.com/wp-content/uploads/2021/01/dog03.jpg"
        alt=""
      />
    </div>
    <div class="swiper-slide">
      <img
        src="https://junpei-sugiyama.com/wp-content/uploads/2021/08/dog04.jpg"
        alt=""
      />
    </div>
    <div class="swiper-slide">
      <img
        src="https://junpei-sugiyama.com/wp-content/uploads/2021/08/dog05.jpg"
        alt=""
      />
    </div>
    <div class="swiper-slide">
      <img
        src="https://junpei-sugiyama.com/wp-content/uploads/2021/08/dog06.jpg"
        alt=""
      />
    </div>
  </div>
  <!-- ページネーション -->
  <div class="swiper-pagination"></div>
  <!-- 前後の矢印 -->
  <div class="swiper-button-prev"></div>
  <div class="swiper-button-next"></div>
</div>
              
            
!

CSS

              
                .swiper-slide img {
  height: auto;
  width: 100%;
}
              
            
!

JS

              
                const swiper = new Swiper(".swiper", {
  loop: true, // ループ
  speed: 1500, // 少しゆっくり(デフォルトは300)
  slidesPerView: 1.5, // 一度に表示する枚数
  spaceBetween: 30, // スライド間の距離
  centeredSlides: true, // アクティブなスライドを中央にする
  autoplay: {
    // 自動再生
    delay: 1000, // 1秒後に次のスライド
    disableOnInteraction: false, // 矢印をクリックしても自動再生を止めない
  },
  // ページネーション
  pagination: {
    el: ".swiper-pagination",
    clickable: true,
  },
  // 前後の矢印
  navigation: {
    nextEl: ".swiper-button-next",
    prevEl: ".swiper-button-prev",
  },
});

              
            
!
999px

Console