css 、jquery实现3d立体旋转

一个用cssjquery实现的3d立体旋转,免费提供源码~~可以供您研究哦~~

UC0PX8`){OLD053S0Q`9)]9.png

代码:

PHP中文网*{margin: 0;padding: 0;}ul,li{list-style: none;}#box {width: 800px;height: 360px;position: relative;margin: 100px auto;perspective: 800px;perspective-origin: right;border: 1px solid #ccc;}#inner {width: 10px;height: 360px;transform-style: preserve-3d;float: left;transform: rotateX(0deg);transform-origin: 50% 50% -180px;}#inner li {width: 10px;height: 360px;position: absolute;}#inner li:nth-child(1) {background:yellow;}#inner li:nth-child(2) {background: green;perspective-origin: bottom;transform: rotateX(90deg);top:-360px;transform-origin: bottom;background: red;}#inner li:nth-child(3) {background: blue;transform: translateZ(-360px) rotateX(180deg) translateY(360px);background:blue;transform-origin:bottom;}#inner li:nth-child(4) {background: yellow;top:360px;transform: rotateX(-90deg);transform-origin: top;background:green;}#btn{margin: 0 auto;border: 1px solid #f00;width: 800px;height: 60px;}#btn input{width: 40px;height: 30px;background: #ccc;}
for(var i=0;i<=78;i++){$("#box").append($("#inner").clone(true))}for(var k=0;k<=80;k++){$("#box ul").eq(k).children().css("background-position",-10*k+"px")}$("#btn input").click(function(){for(var j=0;j<=80;j++){$("#box ul").eq(j).css("transition",300+j*100+"ms")$("#box ul").css("transform","rotateX("+90*$(this).index()+"deg)")}})

免费拿去研究吧!更多好的源码尽在PHP中文网,关注我们给你好看哦~

相关推荐:

css波纹动画

立即学习“前端免费学习笔记(深入)”;

jquery实现手势解锁源码

原生js实现可移动的提示div框源码

以上就是css 、jquery实现3d立体旋转的详细内容,更多请关注创想鸟其它相关文章!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/1545179.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
jquery实现通过ip获取地址
上一篇 2025年12月21日 16:39:28
css波纹动画
下一篇 2025年12月21日 16:39:42

相关推荐

发表回复

登录后才能评论
关注微信