2017-10-11 300 views
0

使用Galleria.io API創建幻燈片。在我的HTML頁面 廣場的DIV標籤的樣子:Galleria自動幻燈片

<div class="content"> 
     <div id="galleria"> 
     <!-- I have used Javascript to input values in this DIV tag --> 
     </div> 

     <div id="full" style="float: right"> 
     <!-- DIV tag for fullscreen and auto slideshow play--> 
     <button>full screen</button> 
     <button>play slideshow</button> 
     </div> 
    </div> 

我已經使用在Galleria.io的下載提供的經典主題,並具有以下腳本中調用DIV標籤的內容(「ID =廣場「)。

<script> 
    $(function() { 
     Galleria.run('#galleria'); 
     }); 
</script> 

我引薦廣場的官方文檔以啓用fullscreenauto slideshow

但這些文檔只提供方法名稱,而不是實現這些方法的示例。有人可以請指導如何在腳本標記中實現這些方法嗎?

此外,我已經通過關於auto-resize in galleria 的討論,並試圖實現,但有問題。

回答

0

所以我找到了答案,並將其作爲Galleria.io定製中的參考發佈。 一切都會一樣,Galleria具有不同功能的參數,我們必須打電話。對於自動幻燈片的功能,我以這種方式在問題中編輯了相同的腳本。

<script> 
     $(function() { 
      Galleria.run('#galleria', {  
       autoplay: 3000, 
       transition: 'flash', 
       transitionSpeed: 600, 

      }); 
     }); 
</script>