Galleria自动幻灯片

时间:2017-10-11 22:24:55

标签: javascript slideshow galleria

使用Galleria.io API创建幻灯片。 我的HTML页面中的Galleria的DIV标记如下所示:

   <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 = galleria”)。

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

我推荐使用Galleria的官方文档来启用fullscreenauto slideshow

但是这些文档只提供方法名称,而不是实现这些方法的示例。有人可以指导如何在脚本标记中实现这些方法吗?

另外,我已经讨论了auto-resize in galleria 并试图实施,但有问题。

1 个答案:

答案 0 :(得分:0)

所以我找到了答案,并在Galleria.io定制中将其作为参考发布。 一切都将是一样的,Galleria有不同功能的参数,我们必须调用。对于自动幻灯片放映的功能,我用这种方式在问题中编辑了相同的脚本。

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

            });
        });
 </script>
相关问题