html
  • css
  • slider
  • owl-carousel
  • 2016-02-04 49 views 1 likes 
    1

    我有一隻貓頭鷹旋轉木馬,貓頭鷹轉盤自定義導航

    它的導航是這樣的:

    enter image description here

    我想讓只有兩個看起來像這樣的導航按鈕:

    enter image description here

    我試過做addinf這一行:

    $(".owl-carousel").owlCarousel({ 
         navigation: true, 
         navigationText: ["<img src='resources/img/arrow-left.png'>","<img src='resources/img/arrow-right.png'>"] 
    }); 
    

    但它不起作用。有沒有一種方法可以刪除其中的一個點,並使另外兩個點像圖片中一樣。

    +0

    的點的工作比你提出的導航系統不同。您的圖像會向左或向右旋轉,而貓頭鷹旋轉木馬的默認導航鏈接指向特定圖像。除非你只有兩張圖像,否則你不得不改變貓頭鷹傳送帶的導航方式。 –

    回答

    1

    添加此

    <script type="text/javascript"> 
    jQuery(document).ready(function() 
    { 
        jQuery('.owl-carousel').owlCarousel({ 
         loop:true, 
         dots:false, 
         nav:true, 
        }); 
    }); 
    </script> 
    
    1

    另一個解決方案是隻是刪除*= require owl.theme這個CSS ,只保留navigation: true

    $(".owl-carousel").owlCarousel({ 
          navigation: true 
    }); 
    
    相關問題