多用途网站模板. 如何管理LightGallery扩展
June 8, 2017
本教程将向您展示如何管理 LightGallery plugin. We use it in our website templates 实现功能友好的移动画廊.
-
为了工作 LightGallery plugin, you should go to FTP or File Manager at Hosting cPanel 并编辑用于包含的页面的文件 LightGallery or HTML 用于所需页面的文件 LightGallery to be added to. 用任何代码编辑它 editor 比如notepad++, Sublime等.
-
使用Ctrl+F搜索“lighgallery” keyword 或者简单地向下滚动页面以查看画廊部分:
-
让我们仔细看看所有可用的属性:
每个图库使用多个图像 data-lightgallery = "集团" 属性用于包含单独图像的适当组的父元素.
包含到特定组中的每个图像包含 data-lightgallery = "组项" and href attributes. 你也可以在这里找到完整尺寸图片的链接:
-
要更改图库内容,只需编辑包含在图库和图片的路径 update caption below:
-
如果要将此类图库添加到任何其他页面, 复制现有图库的代码, 将其粘贴到您想要添加的页面(部分)并编辑图像路径和标题.
-
保存更改并在编辑后将文件重新上传到服务器 FTP. 接下来,刷新站点页面以查看所应用的更改.
-
光廊允许你创造 动画缩略图 for your gallery. 您可以禁用/启用添加 thumbnail 通过编辑到多个图像的画廊 script.js file thumbnail 设置为false/true.
-
光画廊配有美丽的内置 animations. 方法来更改转换的类型 transition 名称通过模式设置在 script.js file. 你可以很容易地创建自己的动画,如果你有CSS知识或检查列表的过渡 here.
-
Lightgallery支持YouTube, Vimeo, VK和所有其他类型的HTML5 video formats. 如MP4、WebM、Ogg等.
To display YouTube, Vimeo or VK video, 粘贴视频链接, or share URL, 这是由YouTube / Vimeo在data-src属性提供的. 与在图库中显示图像的方式相同. Lightgallery将检查data-src属性,如果它是YouTube或Vimeo视频URL, 它将创建视频幻灯片.
-
如果您想创建一个带有 iframe, insert your iframe link in data-src attribute and add data-iframe=”true” and data-lightgallery = "项目".
-
Share plugin allows you to share 你的图像到Twitter, Facebook, Pinterest和Google +. Open script.js file and add share: true 在section中设置lighgallery script initialization.
-
Lightgallery定制,html 属性允许您包含任何类型的 html in to the lightbox. 还有光库哈希 plugin 让您为每个图像提供唯一的url. 所以你可以将Facebook的评论添加到lightgallery中.
现在你知道如何管理了 LightGallery extension.
参见详细说明 开发的网站.
请随时查看下面的详细视频教程:
多用途网站模板. 如何管理LightGallery扩展