2017-06-15 80 views
2

我使用光滑的旋轉木馬插件,下一個箭頭根本不工作,prev箭頭正在像下一個箭頭一樣工作。有人能幫我嗎?下一個光滑的旋轉木馬和prev箭頭無法正常工作

<div class="slickcarousel"> 
     <div><img src = "Nature Photos/Hope.jpg" class="img-responsive" alt = "BlackProPix Photography" height = "160px" width = "176px"></div> 
     <div><img src = "https://www.smashingmagazine.com/wp-content/uploads/2015/06/10-dithering-opt.jpg" class="img-responsive" alt = "BlackProPix Photography" height = "160px" width = "176px"></div> 
     <div><img src = "https://s3-us-west-1.amazonaws.com/powr/defaults/image-slider1.jpg" class="img-responsive" alt = "BlackProPix Photography" height = "160px" width = "176px"></div> 
     <div><img src = "http://i.dailymail.co.uk/i/pix/2017/03/13/13/3E39C90700000578-4308866-image-m-5_1489410821924.jpg" class="img-responsive" alt = "BlackProPix Photography" height = "160px" width = "176px"></div> 
     <div><img src = "http://phototheque.pasteur.fr/images/slideshow/image-9.jpg" class="img-responsive" alt = "BlackProPix Photography" height = "160px" width = "176px"></div> 
     <div><img src = "Nature Photos/Hope.jpg" class="img-responsive" alt = "BlackProPix Photography" height = "160px" width = "176px"></div> 
     <div><img src = "https://www.smashingmagazine.com/wp-content/uploads/2015/06/10-dithering-opt.jpg" class="img-responsive" alt = "BlackProPix Photography" height = "160px" width = "176px"></div> 
     <div><img src = "Nature Photos/Hope.jpg" class="img-responsive" alt = "BlackProPix Photography" height = "160px" width = "176px"></div> 
     <div><img src = "http://phototheque.pasteur.fr/images/slideshow/image-9.jpg" class="img-responsive" alt = "BlackProPix Photography" height = "160px" width = "176px"></div> 
    </div> 

$('.slickcarousel').slick({ 
        infinite: true, 
        slidesToShow: 4, 
        slidesToScroll: 1, 
        centerMode: true, 
        autoplay: true, 
        autoplaySpeed: 2000, 
        pauseOnHover: true 
       }); 
+0

你的兩個按鈕在哪裏?可能下一個按鈕重疊預覽按鈕 – Duannx

+0

@Duannx它不是他們沒有顯示...當我按下一個按鈕什麼也沒有發生 – Breevie

+0

他們沒有顯示。那麼你怎麼點擊它們? – Duannx

回答

1

確保您正確定義了所有的引用?實施例下面:

油滑theme.min.css AND slick.min.css>加載的jQuery> slick.min.js

並設置寬度等width: 90%;留有一定的空間中用於Next /上一頁按鈕

$('.slickcarousel').slick({ 
 
    infinite: true, 
 
    slidesToShow: 4, 
 
    slidesToScroll: 1, 
 
    centerMode: true, 
 
    autoplay: true, 
 
    autoplaySpeed: 2000, 
 
    pauseOnHover: true 
 
});
body { 
 
    background: black; 
 
} 
 
.slickcarousel { 
 
    margin: 0 auto; 
 
    padding: 15px; 
 
    width: 90%; 
 
    color: #333; 
 
    background: #419be0; 
 
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.5.9/slick-theme.min.css" rel="stylesheet" /> 
 
<link href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.5.9/slick.min.css" rel="stylesheet" /> 
 
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.1/jquery.min.js"></script> 
 
<script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.5.9/slick.min.js"></script> 
 

 

 
<div class="slickcarousel"> 
 
    <div><img src="Nature Photos/Hope.jpg" class="img-responsive" alt="BlackProPix Photography" height="160px" width="176px"></div> 
 
    <div><img src="https://www.smashingmagazine.com/wp-content/uploads/2015/06/10-dithering-opt.jpg" class="img-responsive" alt="BlackProPix Photography" height="160px" width="176px"></div> 
 
    <div><img src="https://s3-us-west-1.amazonaws.com/powr/defaults/image-slider1.jpg" class="img-responsive" alt="BlackProPix Photography" height="160px" width="176px"></div> 
 
    <div><img src="http://i.dailymail.co.uk/i/pix/2017/03/13/13/3E39C90700000578-4308866-image-m-5_1489410821924.jpg" class="img-responsive" alt="BlackProPix Photography" height="160px" width="176px"></div> 
 
    <div><img src="http://phototheque.pasteur.fr/images/slideshow/image-9.jpg" class="img-responsive" alt="BlackProPix Photography" height="160px" width="176px"></div> 
 
    <div><img src="Nature Photos/Hope.jpg" class="img-responsive" alt="BlackProPix Photography" height="160px" width="176px"></div> 
 
    <div><img src="https://www.smashingmagazine.com/wp-content/uploads/2015/06/10-dithering-opt.jpg" class="img-responsive" alt="BlackProPix Photography" height="160px" width="176px"></div> 
 
    <div><img src="Nature Photos/Hope.jpg" class="img-responsive" alt="BlackProPix Photography" height="160px" width="176px"></div> 
 
    <div><img src="http://phototheque.pasteur.fr/images/slideshow/image-9.jpg" class="img-responsive" alt="BlackProPix Photography" height="160px" width="176px"></div> 
 
</div>

1

檢查控制檯,它顯示錯誤,請添加它

+0

所有的控制檯錯誤只是這樣說: – Breevie

+1

jquery.min.js:3混合內容:在'https://preview.c9users.io/cstephens1911/theartisanemporium/blackpropix.html?_c9_id=livepreview1&_c9_host=https: ide.c9.io'通過HTTPS加載,但請求一個不安全的圖像'http://phototheque.pasteur.fr/images/slideshow/image-9.jpg'。此內容也應通過HTTPS提供。 – Breevie

+0

可能是你的jQuery衝突 –

相關問題