幻灯片/轮播

jQuery+CSS3超酷3D立方体轮播图插件

阿里云


这是一款 jQuery 和 CSS3 超酷 3D 立方体轮播图插件。该轮播图插件将图片构建为一个 3D 旋转立方体,用户通过点击分页圆点按钮,可以旋转立方体来查看图片。

使用方法

在页面中引入 jquery 和 jQuery.cubeGalleryPlagin.js 文件。

也想出现在这里?联系我们
创客主机
  1. <script type="text/javascript" src = "js/jquery.min.js"></script>
  2. <script type="text/javascript" src = "js/jQuery.cubeGalleryPlagin.js"></script>

HTML 结构

该 3D 立方体轮播图的基本 HTML 结构如下:

  1. <section class="container">
  2.   <div class="carusel">
  3.     <img class="figure" src="images/1.jpg">
  4.     <img class="figure" src="images/2.jpg">
  5.     <img class="figure" src="images/3.jpg">
  6.     <img class="figure" src="images/4.jpg">
  7.     <img class="figure" src="images/5.jpg">
  8.     <img class="figure" src="images/6.jpg">
  9.   </div>
  10.   <div class="btn_links">
  11.     <a href="#" class="button"></a>
  12.     <a href="#" class="button"></a>
  13.     <a href="#" class="button"></a>
  14.     <a href="#" class="button"></a>
  15.     <a href="#" class="button"></a>
  16.     <a href="#" class="button"></a>
  17.   </div>
  18. </section>

CSS 样式

为该 3D 立方体轮播图添加下面的必要 CSS 样式。

  1. *{
  2.     margin: 0;
  3.     padding: 0;
  4. }
  5.  
  6. .container {
  7.     width: 250px;
  8.     height: 250px;
  9.     position: relative;
  10.     margin: 100px auto;
  11.     perspective: 1000px;
  12. }
  13.  
  14. .carusel {
  15.     width: 100%;
  16.     height: 100%;
  17.     position: absolute;
  18.     transform-style: preserve-3d;
  19.     transition: all 1s;
  20.     transform: rotateX(0);
  21.     margin: 50px auto;
  22. }
  23. .btn_links{
  24.     position: relative;
  25.     top: 500px;
  26. }
  27.  
  28. .button{
  29.     width: 15px;
  30.     height: 15px;
  31.     background-color: #000;
  32.     border-radius: 20px;
  33.     display: inline-block;
  34.     margin: 0 10px;
  35.     z-index: 1;
  36. }

配置参数

该 3D 立方体轮播图的默认配置参数如下:

  1. {
  2.   width: 250,
  3.   height: 250,
  4.   linksClass: "button",
  5.   imgClass: "figure",
  6.   caruselClass: "carusel",
  7.   slayderClass: 'container',
  8.   axisRotate : "rotateY" //绕水平轴还是垂直轴旋转
  9. }

Github 地址:https://github.com/matveeta/Cube-jQwery-Slider

jQuery+CSS3 超酷 3D 立方体轮播图插件

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

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

发表回复

热销模板

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

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