最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501
当前位置: 首页 - 科技 - 知识百科 - 正文

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

来源:懂视网 责编:小采 时间:2020-11-27 15:16:27
文档

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

bookblock:可帮助你生成翻页效果的jQuery插件:今天我们介绍一个漂亮的jQuery翻页效果插件 - bookblock,使用它可以创建动态的类似书本翻页效果的幻灯。希望大家喜欢! HTML代码主要html代码如下,生成需要展示的图片内容:<div id="bb-bookblock" class="bb-
推荐度:
导读bookblock:可帮助你生成翻页效果的jQuery插件:今天我们介绍一个漂亮的jQuery翻页效果插件 - bookblock,使用它可以创建动态的类似书本翻页效果的幻灯。希望大家喜欢! HTML代码主要html代码如下,生成需要展示的图片内容:<div id="bb-bookblock" class="bb-

  今天我们介绍一个漂亮的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; }

    声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

    文档

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

    bookblock:可帮助你生成翻页效果的jQuery插件:今天我们介绍一个漂亮的jQuery翻页效果插件 - bookblock,使用它可以创建动态的类似书本翻页效果的幻灯。希望大家喜欢! HTML代码主要html代码如下,生成需要展示的图片内容:<div id="bb-bookblock" class="bb-
    推荐度:
    标签: 插件 jQuery 的jquery
    • 热门焦点

    最新推荐

    猜你喜欢

    热门推荐

    专题
    Top