26497
解決方法が不明なので質問いたしました。下記のリンクのスライダライブラリを使用して  
実現したいスライドがあります。  
<http://www.idangero.us/swiper/#.VpMcPRWLRsc>

その実現したいスライドは下記のサイトにあるようなものです。  
・メイン画像はスライド、クリックで変更できる  
・その下に配置されたサムネイルからその画像を表示できる  
<http://black-flag.net/devel/jQueryResponsiveFlickSlider/>

Swiperでも似たような事は出来ているのですが、  
Swiperのデモにあるようにサムネイルが動いてしまいます。

どなたかご教授願いますでしょうか。よろしくお願いします。
CC BY-SA 3.0
2016-01-11T03:18:32.023
20819
2020-12-23T10:54:03.373
2020-12-23T10:54:03.373
32986
13969
question
javascript html jquery css swiper
この動作をSwiperで実現したい
この様に大丈夫ですか

```

    var galleryTop = new Swiper('.gallery-top', {
            nextButton: '.swiper-button-next',
            prevButton: '.swiper-button-prev',
            spaceBetween: 10,
        });
        var galleryThumbs = new Swiper('.gallery-thumbs', {
            spaceBetween: 10,
            centeredSlides: true,
            slidesPerView: 'auto',
            touchRatio: 0.2,
            slideToClickedSlide: true,
            autoplay: 2500,
            autoplayDisableOnInteraction: false
        });
        galleryTop.params.control = galleryThumbs;
        galleryThumbs.params.control = galleryTop;
```

```

    html, body {
            position: relative;
            height: 100%;
        }
        body {
            background: #000;
            font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
            font-size: 14px;
            color:#000;
            margin: 0;
            padding: 0;
        }
        .swiper-container {
            width: 100%;
            height: 300px;
            margin-left: auto;
            margin-right: auto;
        }
        .swiper-slide {
            background-size: cover;
            background-position: center;
        }
        .gallery-top {
            height: 80%;
            width: 100%;
        }
        .gallery-thumbs {
            height: 20%;
            box-sizing: border-box;
            padding: 10px 0;
        }
        .gallery-thumbs .swiper-slide {
            width: 25%;
            height: 100%;
            opacity: 0.4;
        }
        .gallery-thumbs .swiper-slide-active {
            opacity: 1;
        }
```

```

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Swiper demo</title>
        <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
        <script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.3.1/js/swiper.min.js"></script>
        <link href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.3.1/css/swiper.min.css" rel="stylesheet"/>
    </head>
    <body>
        <!-- Swiper -->
        <div class="swiper-container gallery-top">
            <div class="swiper-wrapper">
               <div class="swiper-slide" style="background-image:url(http://black-flag.net/devel/jQueryResponsiveFlickSlider/img/photo1.jpg)"></div>
                <div class="swiper-slide" style="background-image:url(http://black-flag.net/devel/jQueryResponsiveFlickSlider/img/photo2.jpg)"></div>
                <div class="swiper-slide" style="background-image:url(http://black-flag.net/devel/jQueryResponsiveFlickSlider/img/photo3.jpg)"></div>
                <div class="swiper-slide" style="background-image:url(http://black-flag.net/devel/jQueryResponsiveFlickSlider/img/photo4.jpg)"></div>
                <div class="swiper-slide" style="background-image:url(http://black-flag.net/devel/jQueryResponsiveFlickSlider/img/photo5.jpg)"></div>
            </div>
            <!-- Add Arrows -->
            <div class="swiper-button-next swiper-button-white"></div>
            <div class="swiper-button-prev swiper-button-white"></div>
        </div>
        <div class="swiper-container gallery-thumbs">
            <div class="swiper-wrapper">
                <div class="swiper-slide" style="background-image:url(http://black-flag.net/devel/jQueryResponsiveFlickSlider/img/photo1.jpg)"></div>
                <div class="swiper-slide" style="background-image:url(http://black-flag.net/devel/jQueryResponsiveFlickSlider/img/photo2.jpg)"></div>
                <div class="swiper-slide" style="background-image:url(http://black-flag.net/devel/jQueryResponsiveFlickSlider/img/photo3.jpg)"></div>
                <div class="swiper-slide" style="background-image:url(http://black-flag.net/devel/jQueryResponsiveFlickSlider/img/photo4.jpg)"></div>
                <div class="swiper-slide" style="background-image:url(http://black-flag.net/devel/jQueryResponsiveFlickSlider/img/photo5.jpg)"></div>
            </div>
        </div>
    </body>
    </html>
```
CC BY-SA 3.0
2016-06-06T06:28:26.357
26497
2016-06-06T06:28:26.357
14019
20819
answer