• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com专业计算机教程网站
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • html/xhtml
  • html5
  • CSS
  • XML/XSLT
  • Dreamweaver教程
  • Frontpage教程
  • 心得技巧
  • bootstrap
  • vue
  • AngularJS
  • HBuilder教程
  • css3
  • 浏览器兼容
  • div/css
  • 网页编辑器
  • axure
您的位置:首页 > 网页设计 >html5 > bookblock:可帮助你生成翻页效果的jQuery插件

bookblock:可帮助你生成翻页效果的jQuery插件

作者:匿名 字体:[增加 减小] 来源:互联网 时间:2018-12-03

本文主要包含bookblock,翻页效果,jQuery插件等相关知识,匿名希望在学习及工作中可以帮助到您
  今天我们介绍一个漂亮的jQuery翻页效果插件 - bookblock,使用它可以创建动态的类似书本翻页效果的幻灯。希望大家喜欢!

  •  HTML代码


  • 主要html代码如下,生成需要展示的图片内容:

<div id="bb-bookblock" class="bb-bookblock">
        <div class="bb-item">
            <a href="http://www.gbin1.com"><img src="images/animals/a.jpg" alt="image01"/></a>
        </div>
        <div class="bb-item">
            <a href="http://www.gbin1.com"><img src="images/animals/b.jpg" alt="image02"/></a>
        </div>
        <div class="bb-item">
            <a href="http://www.gbin1.com"><img src="images/animals/c.jpg" alt="image03"/></a>
        </div>
        <div class="bb-item">
            <a href="http://www.gbin1.com"><img src="images/animals/d.jpg" alt="image04"/></a>
        </div>
        <div class="bb-item">
                <a href="http://www.gbin1.com"><img src="images/animals/e.jpg" alt="image05"/></a>
        </div>
        <div class="bb-item">
               <a href="http://www.gbin1.com"><img src="images/animals/f.jpg" alt="image05"/></a>
        </div>
</div>
      Javacript代码
$(function() {

var Page = (function() {

var config = {
     $bookBlock: $( '#bb-bookblock' ),
     $navNext        : $( '#bb-nav-next' ),
     $navPrev        : $( '#bb-nav-prev' ),
     $navJump        : $( '#bb-nav-jump' ),
     bb : $( '#bb-bookblock' ).bookblock( {
        speed  : 800,
        shadowSides        : 0.8,
        shadowFlip        : 0.7
        } )
         },
      init = function() {

    initEvents();
                                
    },
   initEvents = function() {

    var $slides = config.$bookBlock.children(),
     totalSlides = $slides.length;

     // add navigation events
     config.$navNext.on( 'click', function() {

     config.bb.next();
     return false;

    } );

   config.$navPrev.on( 'click', function() {
                                        
    config.bb.prev();
    return false;

   } );

   config.$navJump.on( 'click', function() {
                                        
   config.bb.jump( totalSlides );
  return false;

   } );
                                
   // add swipe events
  $slides.on( {

  'swipeleft'                : function( event ) {
                                        
  config.bb.next();
  return false;

 },
 'swiperight'        : function( event ) {
                                        
  config.bb.prev();
 return false;
                                                
}

 } );

 };

 return { init : init };

})();

Page.init();

});

主要参数

主要参数如下:

// speed for the flip transition in ms.

  speed : 1000,

  // easing for the flip transition.

  easing : 'ease-in-out',

  // if set to true, both the flipping page and the sides will have an overlay to simulate shadows

  shadows : true,

  // opacity value for the "shadow" on both sides (when the flipping page is over it).

  // value : 0.1 - 1

  shadowSides : 0.2,

  // opacity value for the "shadow" on the flipping page (while it is flipping).

  // value : 0.1 - 1

  shadowFlip : 0.1,

  // perspective value

  perspective : 1300,

  // if we should show the first item after reaching the end.

  circular : false,

  // if we want to specify a selector that triggers the next() function. example: '#bb-nav-next'.

  nextEl : '',

  // if we want to specify a selector that triggers the prev() function.

  prevEl : '',

  // callback after the flip transition.

  // page is the current item's index.

  // isLimit is true if the current page is the last one (or the first one).

  onEndFlip : function( page, isLimit ) { return false; },

  // callback before the flip transition.

  // page is the current item's index.

  onBeforeFlip: function( page ) { return false; }


以上就是bookblock:可帮助你生成翻页效果的jQuery插件的内容,更多相关内容请关注微课江湖()!


您可能想查找下面的文章:

  • bookblock:可帮助你生成翻页效果的jQuery插件

相关文章

  • 2017-08-06HTML5 embed标签定义和用法详解
  • 2018-12-03通过HTML5 Canvas API绘制弧线和圆形的教程_html5教程技巧
  • 2017-08-06HTML5 离线应用之打造零请求、无流量网站的解决方法
  • 2018-12-03html5怎样做出图片转圈的动画效果
  • 2017-08-06HTML5 Canvas draw方法制作动画效果示例
  • 2017-08-06html5+css3实现一款注册表单实例
  • 2018-12-03html5 canvas的绘制文本自动换行的示例代码
  • 2017-08-06Html5+JS实现手机摇一摇功能
  • 2018-12-03h5canvas实现雪花飘落的特效代码
  • 2017-08-06详解HTML5中的manifest缓存使用

文章分类

  • html/xhtml
  • html5
  • CSS
  • XML/XSLT
  • Dreamweaver教程
  • Frontpage教程
  • 心得技巧
  • bootstrap
  • vue
  • AngularJS
  • HBuilder教程
  • css3
  • 浏览器兼容
  • div/css
  • 网页编辑器
  • axure

最近更新的内容

    • 使用Modernizr探测HTML5/CSS3新特性的示例代码分享
    • 教你如何用HTML5和JS实现切水果游戏
    • html5文字阴影效果text-shadow使用示例
    • 毫无排版和缩进的 JavaScript 代码,怎么阅读?
    • HTML5新增的表单元素和属性实例解析_html5教程技巧
    • 关于html5中的section标签与div标签的区别(内有实例)
    • 全面解析HTML5的文档结构和新增标签
    • 如何解决table标签和col标签的一系列问题?
    • 前端面试问“你会HTML5吗”到底是什么个意思?
    • HTML5 3D衣服摇摆动画特效

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有