以下是 可播放视频的焦点图代码轮播滚动切换特效 的示例演示效果:
部分效果截图:
HTML代码(index.html):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="JS代码,焦点图,JS广告代码,JS特效代码" />
<meta name="description" content="此代码内容为可播放视频的焦点图代码" />
<title>可播放视频的焦点图代码</title>
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<![endif]-->
<link rel="stylesheet" href="css/blueimp-gallery.css">
<link rel="stylesheet" href="css/blueimp-gallery-indicator.css">
<link rel="stylesheet" href="css/blueimp-gallery-video.css">
<link rel="stylesheet" href="css/demo.css">
</head>
<body>
<!-- 代码 开始 -->
<div class="container">
<div id="blueimp-video-carousel" class="blueimp-gallery blueimp-gallery-controls blueimp-gallery-carousel">
<div class="slides"></div>
<h3 class="title"></h3>
<a class="prev">‹</a>
<a class="next">›</a>
<a class="play-pause"></a>
</div>
</div>
<script src="js/blueimp-helper.js"></script>
<script src="js/blueimp-gallery.min.js"></script>
<script src="js/blueimp-gallery-fullscreen.js"></script>
<script src="js/blueimp-gallery-video.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/jquery.blueimp-gallery.min.js"></script>
<script src="js/demo.js"></script>
<!-- 代码 结束 -->
</body>
</html>
JS代码(demo.js):
/* * blueimp Gallery Demo JS 2.11.1 * https://github.com/blueimp/Gallery * * Copyright 2013,Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license:* http://www.opensource.org/licenses/MIT */
/* global blueimp,$ */
$(function (){
'use strict';
// Initialize the Gallery as video carousel:blueimp.Gallery([{
title:'Sintel',href:'http://caichicong.qiniudn.com/lrtkweb.mp4',type:'video/mp4',poster:'images/1.jpg'}
,{
title:'Big Buck Bunny',href:'http://caichicong.qiniudn.com/lrtkweb.mp4',type:'video/mp4',poster:'images/2.jpg'}
,{
title:'Elephants Dream',href:'http://caichicong.qiniudn.com/lrtkweb.mp4',type:'video/mp4',poster:'images/3.jpg'}
],{
container:'#blueimp-video-carousel',carousel:true}
);
}
);
CSS代码(demo.css):
/* * blueimp Gallery Demo CSS 2.0.0 * https://github.com/blueimp/Gallery * * Copyright 2013,Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license:* http://www.opensource.org/licenses/MIT */
body{max-width:750px;margin:0 auto;padding:1em;font-family:'Lucida Grande','Lucida Sans Unicode',Arial,sans-serif;font-size:1em;line-height:1.4em;background:#222;color:#fff;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
a{color:orange;text-decoration:none;}
img{border:0;vertical-align:middle;}
h1{line-height:1em;}
h2,.links{text-align:center;}
@media (min-width:481px){.navigation{list-style:none;padding:0;}
.navigation li{display:inline-block;}
.navigation li:not(:first-child):before{content:'| ';}
}