图片: blueimp-Bootstrap-Image-Gallery-3.1.1-0-gbee85fa
来源:互联网 发布:lt1028数据手册 编辑:程序博客网 时间:2024/06/08 15:21
</pre><span style="widows: auto; color: rgb(16, 16, 16); font-family: 微软雅黑, 宋体, Tahoma;"><span style="background-color: rgb(245, 245, 245);"></span></span><pre style="font-family: Monaco, Consolas, Courier, 'Lucida Console', monospace;"><span style="font-size:12px;background-color: inherit;">JS</span>
var linksContainer = $('#links') ;
$('<a/>')
.append($('<img>').prop('src', 'img/1.png'))
.prop('href', 'img/1.png')
.prop('title', "ces")
.attr('data-gallery', '')
.appendTo(linksContainer);
$('<a/>')
.append($('<img>').prop('src', 'img/2.png'))
.prop('href', 'img/2.png')
.prop('title', "ces")
.attr('data-gallery', '')
.appendTo(linksContainer);
$('#borderless-checkbox').on('change', function () {
var borderless = $(this).is(':checked');
$('#blueimp-gallery').data('useBootstrapModal', !borderless);
$('#blueimp-gallery').toggleClass('blueimp-gallery-controls', borderless);
});
$('#fullscreen-checkbox').on('change', function () {
$('#blueimp-gallery').data('fullScreen', $(this).is(':checked'));
});
$('#video-gallery-button').on('click', function (event) {
event.preventDefault();
blueimp.Gallery([
{
title: 'Sintel',
href: 'http://media.w3.org/2010/05/sintel/trailer.mp4',
type: 'video/mp4',
poster: 'http://media.w3.org/2010/05/sintel/poster.png'
},
{
title: 'Big Buck Bunny',
href: 'http://upload.wikimedia.org/wikipedia/commons/7/75/' +
'Big_Buck_Bunny_Trailer_400p.ogg',
type: 'video/ogg',
poster: 'http://upload.wikimedia.org/wikipedia/commons/thumb/7/70/' +
'Big.Buck.Bunny.-.Opening.Screen.png/' +
'800px-Big.Buck.Bunny.-.Opening.Screen.png'
},
{
title: 'Elephants Dream',
href: 'http://upload.wikimedia.org/wikipedia/commons/transcoded/8/83/' +
'Elephants_Dream_%28high_quality%29.ogv/' +
'Elephants_Dream_%28high_quality%29.ogv.360p.webm',
type: 'video/webm',
poster: 'http://upload.wikimedia.org/wikipedia/commons/thumb/9/90/' +
'Elephants_Dream_s1_proog.jpg/800px-Elephants_Dream_s1_proog.jpg'
},
{
title: 'LES TWINS - An Industry Ahead',
href: 'http://www.youtube.com/watch?v=zi4CIXpx7Bg',
type: 'text/html',
youtube: 'zi4CIXpx7Bg',
poster: 'http://img.youtube.com/vi/zi4CIXpx7Bg/0.jpg'
},
{
title: 'KN1GHT - Last Moon',
href: 'http://vimeo.com/73686146',
type: 'text/html',
vimeo: '73686146',
poster: 'http://b.vimeocdn.com/ts/448/835/448835699_960.jpg'
}
], $('#blueimp-gallery').data());
});
html:
<!DOCTYPE HTML>
<!--
/*
* Bootstrap Image Gallery Demo 3.0.1
* https://github.com/blueimp/Bootstrap-Image-Gallery
*
* Copyright 2013, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
-->
<html lang="en">
<head>
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<![endif]-->
<meta charset="utf-8">
<title>Bootstrap Image Gallery</title>
<meta name="description" content="Bootstrap Image Gallery is an extension to blueimp Gallery, a touch-enabled, responsive and customizable image and video gallery. It displays images and videos in the modal dialog of the Bootstrap framework, features swipe, mouse and keyboard navigation, transition effects, fullscreen support and on-demand content loading and can be extended to display additional content types.">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css">
<link rel="stylesheet" href="http://blueimp.github.io/Gallery/css/blueimp-gallery.min.css">
<link rel="stylesheet" href="css/bootstrap-image-gallery.css">
<link rel="stylesheet" href="css/demo.css">
</head>
<body>
<div class="container">
<form class="form-inline">
<div class="form-group">
<button id="video-gallery-button" type="button" class="btn btn-success btn-lg">
<i class="glyphicon glyphicon-film"></i>
Launch Video Gallery
</button>
</div>
<div class="form-group">
<button id="image-gallery-button" type="button" class="btn btn-primary btn-lg">
<i class="glyphicon glyphicon-picture"></i>
Launch Image Gallery
</button>
</div>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-success btn-lg">
<i class="glyphicon glyphicon-leaf"></i>
<input id="borderless-checkbox" type="checkbox"> Borderless
</label>
<label class="btn btn-primary btn-lg">
<i class="glyphicon glyphicon-fullscreen"></i>
<input id="fullscreen-checkbox" type="checkbox"> Fullscreen
</label>
</div>
</form>
<br>
<!-- The container for the list of example images -->
<div id="links"></div>
<br>
</div>
<!-- The Bootstrap Image Gallery lightbox, should be a child element of the document body -->
<div id="blueimp-gallery" class="blueimp-gallery">
<!-- The container for the modal slides -->
<div class="slides"></div>
<!-- Controls for the borderless lightbox -->
<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>
<!-- The modal dialog, which will be used to wrap the lightbox content -->
<div class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" aria-hidden="true">×</button>
<h4 class="modal-title"></h4>
</div>
<div class="modal-body next"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left prev">
<i class="glyphicon glyphicon-chevron-left"></i>
Previous
</button>
<button type="button" class="btn btn-primary next">
Next
<i class="glyphicon glyphicon-chevron-right"></i>
</button>
</div>
</div>
</div>
</div>
</div>
<script src="plug/jquery/jquery-1.9.1.js"></script>
<!-- Bootstrap JS is not required, but included for the responsive demo navigation and button states -->
<script src="plug/bootstarp/bootstrap.js"></script>
<script src="http://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js"></script>
<script src="js/bootstrap-image-gallery.min.js"></script>
<script src="js/demo.js"></script>
</body>
</html>
效果:
效果:
JS
var linksContainer = $('#links') ;
$('<a/>')
.append($('<img>').prop('src', 'img/1.png'))
.prop('href', 'img/1.png')
.prop('title', "ces")
.attr('data-gallery', '')
.appendTo(linksContainer);
$('<a/>')
.append($('<img>').prop('src', 'img/2.png'))
.prop('href', 'img/2.png')
.prop('title', "ces")
.attr('data-gallery', '')
.appendTo(linksContainer);
$('#borderless-checkbox').on('change', function () {
var borderless = $(this).is(':checked');
$('#blueimp-gallery').data('useBootstrapModal', !borderless);
$('#blueimp-gallery').toggleClass('blueimp-gallery-controls', borderless);
});
$('#fullscreen-checkbox').on('change', function () {
$('#blueimp-gallery').data('fullScreen', $(this).is(':checked'));
});
$('#video-gallery-button').on('click', function (event) {
event.preventDefault();
blueimp.Gallery([
{
title: 'Sintel',
href: 'http://media.w3.org/2010/05/sintel/trailer.mp4',
type: 'video/mp4',
poster: 'http://media.w3.org/2010/05/sintel/poster.png'
},
{
title: 'Big Buck Bunny',
href: 'http://upload.wikimedia.org/wikipedia/commons/7/75/' +
'Big_Buck_Bunny_Trailer_400p.ogg',
type: 'video/ogg',
poster: 'http://upload.wikimedia.org/wikipedia/commons/thumb/7/70/' +
'Big.Buck.Bunny.-.Opening.Screen.png/' +
'800px-Big.Buck.Bunny.-.Opening.Screen.png'
},
{
title: 'Elephants Dream',
href: 'http://upload.wikimedia.org/wikipedia/commons/transcoded/8/83/' +
'Elephants_Dream_%28high_quality%29.ogv/' +
'Elephants_Dream_%28high_quality%29.ogv.360p.webm',
type: 'video/webm',
poster: 'http://upload.wikimedia.org/wikipedia/commons/thumb/9/90/' +
'Elephants_Dream_s1_proog.jpg/800px-Elephants_Dream_s1_proog.jpg'
},
{
title: 'LES TWINS - An Industry Ahead',
href: 'http://www.youtube.com/watch?v=zi4CIXpx7Bg',
type: 'text/html',
youtube: 'zi4CIXpx7Bg',
poster: 'http://img.youtube.com/vi/zi4CIXpx7Bg/0.jpg'
},
{
title: 'KN1GHT - Last Moon',
href: 'http://vimeo.com/73686146',
type: 'text/html',
vimeo: '73686146',
poster: 'http://b.vimeocdn.com/ts/448/835/448835699_960.jpg'
}
], $('#blueimp-gallery').data());
});
html:
<!DOCTYPE HTML>
<!--
/*
* Bootstrap Image Gallery Demo 3.0.1
* https://github.com/blueimp/Bootstrap-Image-Gallery
*
* Copyright 2013, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
-->
<html lang="en">
<head>
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<![endif]-->
<meta charset="utf-8">
<title>Bootstrap Image Gallery</title>
<meta name="description" content="Bootstrap Image Gallery is an extension to blueimp Gallery, a touch-enabled, responsive and customizable image and video gallery. It displays images and videos in the modal dialog of the Bootstrap framework, features swipe, mouse and keyboard navigation, transition effects, fullscreen support and on-demand content loading and can be extended to display additional content types.">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css">
<link rel="stylesheet" href="http://blueimp.github.io/Gallery/css/blueimp-gallery.min.css">
<link rel="stylesheet" href="css/bootstrap-image-gallery.css">
<link rel="stylesheet" href="css/demo.css">
</head>
<body>
<div class="container">
<form class="form-inline">
<div class="form-group">
<button id="video-gallery-button" type="button" class="btn btn-success btn-lg">
<i class="glyphicon glyphicon-film"></i>
Launch Video Gallery
</button>
</div>
<div class="form-group">
<button id="image-gallery-button" type="button" class="btn btn-primary btn-lg">
<i class="glyphicon glyphicon-picture"></i>
Launch Image Gallery
</button>
</div>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-success btn-lg">
<i class="glyphicon glyphicon-leaf"></i>
<input id="borderless-checkbox" type="checkbox"> Borderless
</label>
<label class="btn btn-primary btn-lg">
<i class="glyphicon glyphicon-fullscreen"></i>
<input id="fullscreen-checkbox" type="checkbox"> Fullscreen
</label>
</div>
</form>
<br>
<!-- The container for the list of example images -->
<div id="links"></div>
<br>
</div>
<!-- The Bootstrap Image Gallery lightbox, should be a child element of the document body -->
<div id="blueimp-gallery" class="blueimp-gallery">
<!-- The container for the modal slides -->
<div class="slides"></div>
<!-- Controls for the borderless lightbox -->
<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>
<!-- The modal dialog, which will be used to wrap the lightbox content -->
<div class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" aria-hidden="true">×</button>
<h4 class="modal-title"></h4>
</div>
<div class="modal-body next"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left prev">
<i class="glyphicon glyphicon-chevron-left"></i>
Previous
</button>
<button type="button" class="btn btn-primary next">
Next
<i class="glyphicon glyphicon-chevron-right"></i>
</button>
</div>
</div>
</div>
</div>
</div>
<script src="plug/jquery/jquery-1.9.1.js"></script>
<!-- Bootstrap JS is not required, but included for the responsive demo navigation and button states -->
<script src="plug/bootstarp/bootstrap.js"></script>
<script src="http://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js"></script>
<script src="js/bootstrap-image-gallery.min.js"></script>
<script src="js/demo.js"></script>
</body>
</html>
效果:
0 0
- 图片: blueimp-Bootstrap-Image-Gallery-3.1.1-0-gbee85fa
- Image Gallery --- Html5&Css3
- Image Gallery Example
- [android_gallery_4.0]gallery补充,加载图片机制
- CSS之responsive image gallery
- (使用android的图片浏览器打开已知路径的图片文件)Open an image using URI in Android's default gallery image viwer
- android图片拖动Gallery
- 从gallery选取图片
- 自动图片切换 Gallery
- Gallery 图片间隔问题
- 使用Gallery查看图片
- 解决 Gallery 图片重叠
- android Gallery滑动图片
- Gallery图片轮播
- 图片浏览器。。Gallery
- Gallery图片浏览
- 图片切换ImageSwitcher&Gallery
- android Gallery(Gallery图片下面有文字)
- OpenStack笔记五 Cinder
- SVN 中trunk、branches、tags都什么意思?
- static静态成员变量和静态成员函数
- visual studio R6034解决方案集 从VC6.0 或VC2003 到VC2005发现的问题
- hostname -i 无法识别hostname的解决的方法
- 图片: blueimp-Bootstrap-Image-Gallery-3.1.1-0-gbee85fa
- Android SystemProperties设置/取得系统属性的用法总结
- Android 退出应用程序问题
- FMDatabaseQueue 数据库多线程操作、事务处理
- AMS管理android四大组件
- 笔试题_红包问题
- VC ClistCtrl不同行背景色
- ViewPage,TabHost与Fragment(上)
- php为图片填加水印