基于jQuery实现视频画廊插件



81 322 108



特效描述:基于jQuery实现 视频画廊插件,基于jQuery实现视频画廊插件

代码结构

1. 引入CSS

<link href="royalslider/royalslider.css" rel="stylesheet">
<link href="preview-assets/css/reset.css?v=1.0.4" rel="stylesheet">
<link href="royalslider/skins/default/rs-default.css?v=1.0.4" rel="stylesheet">
<link href="royalslider/royalslider.css" rel="stylesheet">
<link href="preview-assets/css/reset.css?v=1.0.4" rel="stylesheet">
<link href="royalslider/skins/default/rs-default.css?v=1.0.4" rel="stylesheet">

2. 引入JS

<script src="royalslider/jquery-1.8.3.min.js"></script>
<script src="royalslider/jquery.royalslider.min.js?v=9.3.6"></script>
<script src="royalslider/jquery-1.8.3.min.js"></script>
<script src="royalslider/jquery.royalslider.min.js?v=9.3.6"></script>

3. HTML代码

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="gb2312">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">    
<title></title>
<meta name="viewport" content="width = device-width, initial-scale = 1.0" />
<style>
      #video-gallery {
  width: 100%;
}
.videoGallery .rsTmb {
  padding: 20px;
}
.videoGallery .rsThumbs .rsThumb {
  width: 220px;
  height: 80px;
  border-bottom: 1px solid #2E2E2E;
}
.videoGallery .rsThumbs {
  width: 220px;
  padding: 0;
}
.videoGallery .rsThumb:hover {
  background: #000;
}
.videoGallery .rsThumb.rsNavSelected {
  background-color: #02874A;
  border-bottom:-color #02874A;
}
.sampleBlock {
  left: 3%; 
  top: 1%; 
  width: 100%;
  max-width: 400px;
}
.rsVideoContainer {
width:100%; 
height:100%; 
overflow:hidden; 
display:block; 
float:left; 
}
@media screen and (min-width: 0px) and (max-width: 500px) {
  .videoGallery .rsTmb {
    padding: 6px 8px;
  }
  .videoGallery .rsTmb h5 {
    font-size: 12px;
    line-height: 17px;
  }
  .videoGallery .rsThumbs.rsThumbsVer {
    width: 100px;
    padding: 0;
  }
  .videoGallery .rsThumbs .rsThumb {
    width: 100px;
    height: 47px;
  }
  .videoGallery .rsTmb span {
    display: none;
  }
  .videoGallery .rsOverflow,
  .royalSlider.videoGallery {
    height: 300px !important;
  }
  .sampleBlock {
    font-size: 14px;
  }
}
    </style>
  </head>
  <body >
  <div  class="page wrapper main-wrapper">  
      <div class="row clearfix">
    <div id="page-navigation" class="col span_6"> 
        <div class="left page-nav-item"></div> 
        <div class="right page-nav-item"></div> 
	</div> 
</div>
<div class="row clearfix">
  <div class="col span_6 fwImage">
<div id="video-gallery" class="royalSlider videoGallery rsDefault">
  <a class="rsImg" data-rsw="843" data-rsh="473" data-rsVideo="http://www.51qianduan.com//watch?v=HFbHRWwyihE" href="img/video/admin-video.png">
    <div class="rsTmb">
      <h5>New RoyalSlider</h5>
      <span>by Dmitry Semenov</span>
    </div>
  </a>
   <a class="rsImg" data-rsVideo="https://vimeo.com/45830194" href="img/video/08.jpg">
    <div class="rsTmb">
      <h5>Stanley Piano</h5>
      <span>by Digital Kitchen</span>
    </div>
  </a>
  <div class="rsContent">
    <a class="rsImg" data-rsVideo="https://vimeo.com/31240369" href="img/video/07.jpg">
      <div class="rsTmb">
        <h5>I Believe I Can Fly</h5>
        <span>by sebastien montaz-rosset</span>
      </div>
    </a>
    <h3 class="rsABlock sampleBlock">Animated block, to show you that you can put anything you want inside each slide.</h3>
  </div>
   <a class="rsImg" data-rsVideo="https://vimeo.com/44878206" href="img/video/06.jpg">
    <div class="rsTmb">
      <h5>Dubstep Dispute</h5>
      <span>by Fluxel Media</span>
    </div>
  </a>
  <a class="rsImg" data-rsVideo="https://vimeo.com/45778774" href="img/video/05.jpg">
    <div class="rsTmb">
      <h5>The Epic & The Beasts</h5>
      <span>by Sebastian Linda</span>
    </div>
  </a>
   <a class="rsImg" data-rsVideo="https://vimeo.com/41132461" href="img/video/04.jpg">
    <div class="rsTmb">
      <h5>Barcode Band</h5>
      <span>by Kang woon Jin</span>
    </div>
  </a>
 <a class="rsImg" data-rsVideo="hhttps://vimeo.com/44388232" href="img/video/03.jpg">
    <div class="rsTmb">
      <h5>Samm Hodges Reel</h5>
      <span>by Animal</span>
    </div>
  </a>
  <a class="rsImg" data-rsVideo="http://www.51qianduan.com//watch?v=VDspPKDMBMo" href="img/video/02.jpg">
    <div class="rsTmb">
      <h5>The Foundry Showreel</h5>
      <span>by The Foundry</span>
    </div>
  </a>
</div>
  </div>
</div>
  </div>
  <div class="wrapper page">
    <script>
      jQuery(document).ready(function($) {
  $('#video-gallery').royalSlider({
    arrowsNav: false,
    fadeinLoadedSlide: true,
    controlNavigationSpacing: 0,
    controlNavigation: 'thumbnails',
    thumbs: {
      autoCenter: false,
      fitInViewport: true,
      orientation: 'vertical',
      spacing: 0,
      paddingBottom: 0
    },
    keyboardNavEnabled: true,
    imageScaleMode: 'fill',
    imageAlignCenter:true,
    slidesSpacing: 0,
    loop: false,
    loopRewind: true,
    numImagesToPreload: 3,
    video: {
      autoHideArrows:true,
      autoHideControlNav:false,
      autoHideBlocks: true
    }, 
    autoScaleSlider: true, 
    autoScaleSliderWidth: 960,     
    autoScaleSliderHeight: 450,
    imgWidth: 640,
    imgHeight: 360
  });
});
    </script>
  </div>
 <div style="text-align:center;clear:both">
</div>
  </body>
</html>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: 滑动导航菜单 导航切换 图片延迟加载 图片头像上传 缩略图 滑动选项卡切换 加载动画 文件上传 图片相册 文字延迟加载 图片滑动 图片切换 文本框 图片墙 文字滑动 文字切换 下拉框 百叶窗 滑动手风琴 背景切换 复选 图片网格 滑动星星打分 手风琴 单选 图片九宫格 选项卡自动切换 登录框 视频切换 注册框 图片高亮 列表切换 搜索框 图片对比 验证码 图片文字 渐隐切换 二级联动 单排图片 全屏切换 三级联动 响应式图片 切换按钮 城市选择 图片列表 缩放切换 value赋值 筛选 按钮控制 购物车 颜色选择 表单提交 全选/反选 添加删除 添加标签 密码强度验证 表单验证 html5按钮动画 按钮样式 密码修改设置 图片拖动 图片放大镜 图片叠加 图片翻转旋转 图片延迟加载 图片淡出淡进 图片全屏 图片头像上传 二维码 滑动滑过 滚动切换 滑动选项卡切换 图片广告 图片放大缩小 html5图片动画 带缩略图的幻灯片 地图 图片滚动 图片滑动 图片切换 图片收缩展开 旋转木马 图片轮播 自动滚动图片轮播 图标导航菜单 选项卡切换 滑动手风琴 背景切换 手风琴 延长延迟加载 切换按钮 form表单 图表 图片 头像截图

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到