# blueimp Gallery
- [Demo](#demo)
- [Description](#description)
- [Setup](#setup)
- [Lightbox setup](#lightbox-setup)
- [Controls](#controls)
- [Carousel setup](#carousel-setup)
- [Keyboard shortcuts](#keyboard-shortcuts)
- [Options](#options)
- [Default options](#default-options)
- [Event callbacks](#event-callbacks)
- [Carousel options](#carousel-options)
- [Indicator options](#indicator-options)
- [Fullscreen options](#fullscreen-options)
- [Video options](#video-options)
- [Video factory options](#video-factory-options)
- [YouTube options](#youtube-options)
- [Vimeo options](#vimeo-options)
- [Container and element options](#container-and-element-options)
- [Property options](#property-options)
- [API](#api)
- [Initialization](#initialization)
- [API methods](#api-methods)
- [Videos](#videos)
- [HTML5 video player](#html5-video-player)
- [Multiple video sources](#multiple-video-sources)
- [YouTube](#youtube)
- [Vimeo](#vimeo)
- [Additional Gallery elements](#additional-gallery-elements)
- [Additional content types](#additional-content-types)
- [Example HTML text factory implementation](#example-html-text-factory-implementation)
- [jQuery plugin](#jquery-plugin)
- [jQuery plugin setup](#jquery-plugin-setup)
- [HTML5 data-attributes](#html5-data-attributes)
- [Container ids and link grouping](#container-ids-and-link-grouping)
- [Gallery object](#gallery-object)
- [jQuery events](#jquery-events)
- [Requirements](#requirements)
- [Browsers](#browsers)
- [Desktop browsers](#desktop-browsers)
- [Mobile browsers](#mobile-browsers)
- [License](#license)
- [Credits](#credits)
- [Notable forks](#notable-forks)
## Demo
[blueimp Gallery Demo](https://blueimp.github.io/Gallery/)
## Description
blueimp Gallery is a touch-enabled, responsive and customizable image and video
gallery, carousel and lightbox, optimized for both mobile and desktop web
browsers.
It features swipe, mouse and keyboard navigation, transition effects, slideshow
functionality, fullscreen support and on-demand content loading and can be
extended to display additional content types.
## Setup
### Lightbox setup
Copy the **css**, **img** and **js** directories to your website.
Include the Gallery stylesheet in the head section of your webpage:
```html
<link rel="stylesheet" href="css/blueimp-gallery.min.css">
```
Add the following HTML snippet with the Gallery widget to the body of your
webpage:
```html
<!-- The Gallery as lightbox dialog, should be a child element of the document body -->
<div id="blueimp-gallery" class="blueimp-gallery">
<div class="slides"></div>
<h3 class="title"></h3>
<a class="prev">‹</a>
<a class="next">›</a>
<a class="close">×</a>
<a class="play-pause"></a>
<ol class="indicator"></ol>
</div>
```
Include the Gallery script at the bottom of the body of your webpage:
```html
<script src="js/blueimp-gallery.min.js"></script>
```
Create a list of links to image files, optionally with enclosed thumbnails and
add them to the body of your webpage, before including the Gallery script:
```html
<div id="links">
<a href="images/banana.jpg" title="Banana">
<img src="images/thumbnails/banana.jpg" alt="Banana">
</a>
<a href="images/apple.jpg" title="Apple">
<img src="images/thumbnails/apple.jpg" alt="Apple">
</a>
<a href="images/orange.jpg" title="Orange">
<img src="images/thumbnails/orange.jpg" alt="Orange">
</a>
</div>
```
Add the following JavaScript code after including the Gallery script, to display
the images in the Gallery lightbox on click of the links:
```html
<script>
document.getElementById('links').onclick = function (event) {
event = event || window.event;
var target = event.target || event.srcElement,
link = target.src ? target.parentNode : target,
options = {index: link, event: event},
links = this.getElementsByTagName('a');
blueimp.Gallery(links, options);
};
</script>
```
### Controls
To initialize the Gallery with visible controls, add the CSS class
**blueimp-gallery-controls** to the Gallery widget:
```html
<div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls">
<div class="slides"></div>
<h3 class="title"></h3>
<a class="prev">‹</a>
<a class="next">›</a>
<a class="close">×</a>
<a class="play-pause"></a>
<ol class="indicator"></ol>
</div>
```
### Carousel setup
To display the images in an inline carousel instead of a lightbox, follow the
[lightbox setup](#lightbox-setup) and add the CSS class
**blueimp-gallery-carousel** to the Gallery widget and remove the child element
with the **close** class, or add a new Gallery widget with a different **id**
to your webpage:
```html
<!-- The Gallery as inline carousel, can be positioned anywhere on the page -->
<div id="blueimp-gallery-carousel" class="blueimp-gallery blueimp-gallery-carousel">
<div class="slides"></div>
<h3 class="title"></h3>
<a class="prev">‹</a>
<a class="next">›</a>
<a class="play-pause"></a>
<ol class="indicator"></ol>
</div>
```
Add the following JavaScript code after including the Gallery script to
initialize the carousel:
```html
<script>
blueimp.Gallery(
document.getElementById('links').getElementsByTagName('a'),
{
container: '#blueimp-gallery-carousel',
carousel: true
}
);
</script>
```
## Keyboard shortcuts
The Gallery can be controlled with the following keyboard shortcuts:
* **Return**: Toggle controls visibility.
* **Esc**: Close the Gallery lightbox.
* **Space**: Toggle the slideshow (play/pause).
* **Left**: Move to the previous slide.
* **Right**: Move to the next slide.
Please note that setting the **carousel** option to **true** disables the
keyboard shortcuts by default.
## Options
### Default options
The following are the default options set by the core Gallery library:
```js
var options = {
// The Id, element or querySelector of the gallery widget:
container: '#blueimp-gallery',
// The tag name, Id, element or querySelector of the slides container:
slidesContainer: 'div',
// The tag name, Id, element or querySelector of the title element:
titleElement: 'h3',
// The class to add when the gallery is visible:
displayClass: 'blueimp-gallery-display',
// The class to add when the gallery controls are visible:
controlsClass: 'blueimp-gallery-controls',
// The class to add when the gallery only displays one element:
singleClass: 'blueimp-gallery-single',
// The class to add when the left edge has been reached:
leftEdgeClass: 'blueimp-gallery-left',
// The class to add when the right edge has been reached:
rightEdgeClass: 'blueimp-gallery-right',
// The class to add when the automatic slideshow is active:
playingClass: 'blueimp-gallery-playing',
// The class for all slides:
slideClass: 'slide',
// The slide class for loading elements:
slideLoadingClass: 'slide-loading',
// The slide class for elements that failed to load:
slideErrorClass: 'slide-error',
// The class for the content element loaded into each slide:
slideContentClass: 'slide-content',
// The class for the "toggle" control:
toggleClass: 'toggle',
// The class for the "prev" control:
prevClass: 'prev',
// The class for the "next" control:
nextClass: 'next',
// The class for the "close" control:
closeClass: 'close',
// The class for the "play-pause" toggle control:
playPauseClass: 'play-pause',
// The list object property (or data attribute) with the object type:
typeProperty: 'type',
// The list object property (or data attribute) with the object title:
titleProperty: 'title',
// The list object property (or data attribute) with the object alt
没有合适的资源?快使用搜索试试~ 我知道了~
基于yii2,土人二开源cms+notify系统,极度符合yii2默认的开发方式,拿来即用,5分钟建站,10分钟上手。.zip
共2000个文件
php:2870个
js:772个
gif:409个
需积分: 0 0 下载量 110 浏览量
2023-07-23
21:56:36
上传
评论
收藏 20.64MB ZIP 举报
温馨提示
php程序设计,web系统源码,源码,数据库MySQL,毕业设计项目,可用于课程设计作业等。
资源推荐
资源详情
资源评论
收起资源包目录
基于yii2,土人二开源cms+notify系统,极度符合yii2默认的开发方式,拿来即用,5分钟建站,10分钟上手。.zip (2000个子文件)
style.css 166KB
main.css 120KB
bootstrap.min.css 115KB
bootstrap.min.css 115KB
animate.css 64KB
test.css 48KB
content.css 47KB
ueditor.css 43KB
ueditor.css 37KB
admin.css 37KB
ueditor.min.css 34KB
ueditor.min.css 33KB
iconfont.css 32KB
iconfont.css 32KB
font-awesome.css 32KB
font-awesome.css 32KB
font-awesome.min.css 26KB
font-awesome.min.css 26KB
wnl.css 26KB
common.css 23KB
jquery-confirm.min.css 21KB
video-js.css 21KB
default.css 20KB
default.css 20KB
site.css 20KB
jquery.datetimepicker.css 18KB
image.css 18KB
swiper.min.css 17KB
select2.css 17KB
select2.css 17KB
animate.min.css 17KB
jquery.datetimepicker.min.css 16KB
jquery.datetimepicker.min.css 16KB
account.css 15KB
video.css 15KB
select2.min.css 15KB
select2.min.css 15KB
attachment.css 14KB
layer.css 14KB
video-js.min.css 11KB
layer.css 11KB
layer.css 11KB
nv.d3.min.css 9KB
nv.d3.min.css 9KB
frame.css 9KB
laydate.css 8KB
blueimp-gallery.min.css 7KB
shCoreDefault.css 7KB
sidebox.css 7KB
login.css 7KB
global.css 6KB
blueimp-gallery.css 6KB
mocha.css 5KB
mocha.css 5KB
mocha.css 5KB
mocha.css 5KB
mocha.css 5KB
calendar-blue.css 5KB
owl.transitions.css 4KB
menu.css 4KB
share.min.css 4KB
jquery.bxslider.css 4KB
scrawl.css 4KB
style.css 4KB
style.css 4KB
jquery.Jcrop.css 3KB
jquery.Jcrop.css 3KB
slick-theme.css 3KB
idangerous.swiper.css 3KB
demos.css 3KB
jquery.bxslider.min.css 3KB
qq.css 3KB
qq.css 3KB
unit.css 3KB
layer.ext.css 3KB
layer.ext.css 3KB
codemirror.css 3KB
charts.css 3KB
background.css 2KB
pace-theme-flash.css 2KB
blueimp-gallery-indicator.css 2KB
blueimp-gallery-video.css 2KB
simple.css 2KB
simple.css 2KB
purebox-default.css 2KB
jquery.Jcrop.min.css 2KB
purebox-metro.css 2KB
style.css 2KB
style.css 2KB
emotion.css 2KB
slick.css 2KB
dialogbase.css 2KB
owl.theme.css 2KB
music.css 2KB
purebox-facebook.css 2KB
owl.carousel.css 1KB
demo.css 1KB
white.css 1KB
demo.css 1KB
edittable.css 1KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
白话机器学习
- 粉丝: 8904
- 资源: 7681
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- vscode-1.64.1.tar源码文件
- vscode-1.64.0.tar源码文件
- vscode-1.52.0.tar源码文件
- Music-Player +PlayerActivity+ rockplayer+ SeeJoPlayer 播放器JAVA源码
- vscode-1.46.0.tar源码文件
- 最近很火植物大战僵尸杂交版2.08苹果+安卓+PC+防闪退工具V2+修改工具+高清工具+通关存档整合包更新
- 超级好用的截图工具PixPin,可录制Gif图
- Screenshot_2024-05-21-17-06-42-64_2332cb9b27b851b548ba47a91682926c.jpg
- 毕业设计参考 - 基于树莓派、OpenCV及Python的人脸识别
- node-v18.20.2-linux-arm64
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功