设为首页 加入收藏

TOP

78.3D立体轮播图(完整兼容手机端和pc端)(一)
2019-09-17 18:27:02 】 浏览:73
Tags:78.3D 立体 完整 兼容 手机

效果呈现来源于http://www.jq22.com/demo/jR3DCarousel-master20160315/

在此基础上改成需要的3个分类的3D图

由于原有的不支持粘贴复制显示3个分类

我通过点击分类去获取当前分类下的图片路径生成3d

最后发现每一种分类下图片要么都是小于8张,

要么都是大于8张,此目的是因为保证每个3d图角度一样

修改后的效果可以去https://m.zqins.com/参观

html:

<div class="find-tab">
<span class="find-span-active" value="1"><b>户型</b><i></i></span>
<span value="2"><b>风格</b><i></i></span>
<span value="3"><b>空间</b><i></i></span>
</div>
<div class="find-slide">
<ul class="find-ul find-ul-active">
<div class="jR3DCarouselGallery"></div>
</ul>
</div>

js:

sandJson为图片数组。

var sandJson=[
{
"erd": 图片id,
"yid": 1,
"src": "图片路径",
"href": "a链接"
},
{
"erd":图片id,
"yid": 2,
"src": "https://m.zqins.com/public/static/sj/img/3d/style1.png",
"href": "https://m.zqins.com/xiaoguotu/?hx=129&&lx=&&fg=&&jb="
},

{ "erd": 图片id,
"yid": 3,
"src": "https://m.zqins.com/public/static/sj/img/3d/kong1.png",
"href": "https://m.zqins.com/xiaoguotu/?hx=&&lx=142&&fg=&&jb="
},

]

引入此js,如果需要修改3d的HTML,可以在此js里修改循环语句。

/**
 * Author: Vinayak Rangnathrao Jadhav
 * Project: jR3DCarousel
 * Version: 0.0.8
 **/
(function(g){"function"===typeof define&&define.amd?define(["jquery"],g):"object"===typeof exports?module.exports=g(require("jquery")):g(jQuery)})(function(g){g.fn.jR3DCarousel=function(y){function x(){this.animations={slide:A,slide3D:B,scroll:C,scroll3D:D,fade:E}}function A(a){d.css({perspective:"",overflow:"hidden"});c=f*a;h.css({transform:"translateZ("+-e+"px) rotateY("+-c+"deg)"});u()}function B(a){d.css({perspective:k,overflow:"visible"});c=f*a;h.css({transform:"translateZ("+-e+"px) rotateY("+
-c+"deg)"});u()}function C(a){d.css({perspective:"",overflow:"hidden"});c=f*a;h.css({transform:"translateZ("+-e+"px) rotateX("+-c+"deg)"});u()}function D(a){d.css({perspective:k,overflow:"visible"});c=f*a;h.css({transform:"translateZ("+-e+"px) rotateX("+-c+"deg)"});u()}function E(g){h.css({transition:"opacity "+a.animationDuration+"ms "+a.animationCurve,opacity:0});d.find(".nav").css({backgroundColor:"rgba(255, 255, 255, 0.77)"}).eq(m%b).css({backgroundColor:"rgba(0, 0, 0, 1)"});clearTimeout(k);var k=
    setTimeout(function(){c=f*g;h.css({transform:"translateZ("+-e+"px) rotateY("+-c+"deg)",opacity:1});l=(Math.round(c/f)-1)%b;a.onSlideShow.call(this,h.find("."+a.slideClass).eq((l+1)%b))},a.animationDuration)}function u(){d.find(".nav").css({back
首页 上一页 1 2 3 4 下一页 尾页 1/4/4
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇vue.js 打包时出现空白页和路径错.. 下一篇Element-UI 2.4.11 版本 使用注意..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目