幻灯片/轮播

jQuery超酷3D幻灯片效果

阿里云

flux.js 是一款能做出 3D 效果的 jQuery 幻灯片插件。这款 jQuery 幻灯片插件共有 5 种效果:爆炸效果、3D 翻转效果、3D 旋转效果、立方体效果和翻页效果。需要注意的是 flux 需要浏览器支持 CSS3 transitions 才能正常工作。

HTML 结构:

  1. <div id="slider">
  2.   <img src="imgs/peacock.jpg" alt="" />
  3.   <img src="imgs/koi.jpg" alt="" />
  4.   <img src="imgs/life.jpg" alt="" />
  5. </div>
  6. <ul class="transitions">
  7.   <li><button type="button" data-transition="explode" data-params='{"rows": 4}'>Explode</button></li>
  8.   <li><button type="button" data-transition="tiles3d" data-params='{"columns": 6}'>Tile</button></li>
  9.   <li><button type="button" data-transition="bars3d">Bars</button></li>
  10.   <li><button type="button" data-transition="cube">Cube</button></li>
  11.   <li><button type="button" data-transition="turn">Turn</button></li>
  12. </ul>
也想出现在这里?联系我们
创客主机

调用方法:

首先要引入 jQuery 和 jquery.flux.js 文件。然后按下面方法调用:

  1. $(function(){
  2.   if(!flux.browser.supportsTransitions)
  3.     alert("Flux Slider requires a browser that supports CSS3 transitions");
  4.  
  5.   window.f = new flux.slider('#slider', {
  6.     pagination: false,
  7.     controls: false,
  8.     transitions: ['explode', 'tiles3d', 'bars3d', 'cube', 'turn'],
  9.     autoplay: false
  10.   });
  11.  
  12.   $('.transitions').click(function(event){
  13.     event.preventDefault();
  14.     window.f.next($(event.target).data('transition'), $(event.target).data('params'));
  15.   });
  16. });

jQuery 超酷 3D 幻灯片效果

已有 388 人购买
查看演示升级 VIP立刻购买

演示地址 下载地址
收藏
(0)

发表回复

热销模板

Ashade - 作品展示摄影相册WordPress汉化主题
LensNews

本站承接 WordPress / PbootCMS / DedeCMS 等
系统建站、仿站、开发、定制等业务!