【问题标题】:Galleria auto slideshow画廊自动幻灯片
【发布时间】:2017-10-11 22:24:55
【问题描述】:

使用 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 的官方文档以启用 fullscreen 和 auto slideshow。

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

另外,我已经讨论过auto-resize in galleria 并尝试实施但遇到问题。

【问题讨论】:

    标签: javascript slideshow galleria


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-13
      • 1970-01-01
      • 1970-01-01
      • 2013-12-28
      • 2015-10-03
      • 2015-04-21
      相关资源
      最近更新 更多