拱廊自动幻灯片



使用 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的官方文档,用于启用全屏和自动幻灯片。

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

另外,我已经完成了有关在galleria中自动调整大小的讨论并尝试实施但有问题。

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

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

最新更新