限时优惠活动
亲爱的苦力吧用户,我们为了回馈新老用户一直以来的鼎力支持,即日起(2025-02-06至2025-03-06)凡是购买苦力吧VIP/充值K币的新老用户,都直接可获得买一送一的优惠馈赠。例如:购买一个月的VIP会员可直接获得两个月的VIP会员;充值100K币可直接获得200K币,以此类推!有任何疑问可联系在线客服,感谢各位用户对苦力吧素材的信任与厚爱,我们将一如既往的给大家上新更多优质的素材源码,祝大家开工大吉、工作顺利、心想事成。

jquery图片拼成的3D立方体旋转动画特效代码

所属分类: 网页特效-图片特效&上传    2024-02-26 09:27:21

jquery图片拼成的3D立方体旋转动画特效代码 ie兼容6
 查看演示  登录后下载 温馨提示
登录会员即可享受免费下载
 我要建站

jquery图片拼成的3D立方体旋转动画特效代码(共11个文件)

    • index.html

使用方法

var trans3DDemo1 = $("#trans3DDemo1"), 
    trans3DBoxes1 = $("#trans3DBoxes1"),// div containing all the the boxes
    boxes1 = $("#trans3DBoxes1 div"), // all the boxes
    threeDTimeline = new TimelineMax({onUpdate:updateCube, repeat:-1}),
	stageW = ($(window).width())/2,
	stageH = ($(window).height())/2,
	stageX = (stageW-(trans3DBoxes1.width()/2)),
	stageY = (stageH-(250/2));
//transformPerspective gives the element its own vanishing point
//perspective allows all the child elements (orange boxes) to share the same vanishing point with each other
//transformStyle:"preserve3d" allows the child elements to maintain their 3D position (noticeable only when their parent div is rotated in 3D space)
TweenMax.set(trans3DBoxes1, {css:{transformPerspective:3000, transformStyle:"preserve-3d"}}); //saves a dozen lines of vendor-prefixed css ;)
/*
K, lets build a cube and place it
boxes1[0] = frontside
boxes1[1] = leftside
boxes1[2] = rightside
boxes1[3] = topside
boxes1[4] = bottomside
boxes1[5] = backside
*/
threeDTimeline.set(boxes1[0], {rotationX:0, rotationY:0, x:0, y:0, z:125, opacity:0.85})
              .set(boxes1[1], {rotationX:0, rotationY:-90, x:-125, y:0, z:0, opacity:0.85})
			  .set(boxes1[2], {rotationX:0, rotationY:90, x:125, y:0, z:0, opacity:0.85})
			  .set(boxes1[3], {rotationX:90, rotationY:0, x:0, y:-125, z:0, opacity:0.85})
			  .set(boxes1[4], {rotationX:-90, rotationY:0, x:0, y:125, z:0, opacity:0.85})
			  .set(boxes1[5], {rotationX:0, rotationY:180, x:0, y:0, z:-125, opacity:0.85})
			  .set(trans3DBoxes1, {x:150, y:150, transformOrigin:"125px 125px 0px"});
// hover events

boxes1.each(function (index, element) {
			$(element).hover(over, out);
			function over(){
				TweenMax.to(element, 0.15, {opacity:0.33});
				//threeDTimeline.pause();
			}
			function out(){
				TweenMax.to(element, 0.15, {opacity:0.85});
				//threeDTimeline.play();
			}
});

//
threeDTimeline.to(trans3DBoxes1, 15, {css:{rotationY:360, rotationX:-720, transformOrigin:"125px 125px 0px"}, ease:Power0.easeNone});
//
function updateCube(){
	stageW = ($(window).width())/2;
	stageH = ($(window).height())/2;
	stageX = (stageW-(trans3DBoxes1.width()/2));
	stageY = (stageH-(250/2));
	TweenMax.to(trans3DBoxes1, 1, {css:{x:stageX, y:stageY}});
}

站长提示:
1. 苦力吧素材官方QQ群:950875342
2. 平台上所有素材资源,需注册登录会员方能正常下载。
3. 会员用户积极反馈网站、素材资源BUG或错误问题,每次奖励2K币
4. PHP源码类素材,如需协助安装调试,或你有二次开发需求,可联系苦力吧客服。
5. 付费素材资源,需充值后方能下载,如有任何疑问可直接联系苦力吧客服
相关资源 / 图片特效&上传

jquery带缩略图可点击切换的产品订购详情图片展示特效

一款商城网站商品图片展示特效,带有产品缩略图的图片切换。当点击图片缩略图时,会随之切换至对应的商品大图。
  图片特效&上传
 2503  0

jquery响应式图文内容上下滑块切换特效代码

一款响应式布局的切换滑块插件,在固定的DIV布局中,点击上下切换按钮,可进行图片和文字内容的替换。
  图片特效&上传
 7336  0

jquery支持拖拽触摸滑动的图片移动特效代码

一款拖拽滑动图片查看插件,可使用鼠标拖动图片或触摸滑动事件,在固定的DIV区域内可水平或垂直移动图片。
  图片特效&上传
 2330  0

jquery轻量级带进度条的图片视频轮播切换插件

一款支持图片、视频文件的图片轮播特效,带左右箭头及底部方格切换,响应式设计。
  图片特效&上传
 2360  0

评论数(0) 回复有机会获得K币 用户协议

^_^ 还没有人评论,快来抢个沙发!
😀
  • 😀
  • 😊
  • 😂
  • 😍
  • 😑
  • 😷
  • 😵
  • 😛
  • 😣
  • 😱
  • 😋
  • 😎
  • 😵
  • 😕
  • 😶
  • 😚
  • 😜
  • 😭
发表评论