您的位置:首页 > Web前端 > JavaScript

javascript 3D图片轮换

2014-07-30 16:50 429 查看


演示:http://www.pengyaou.com/LegendsZ/eg/fivelg.html

代码:

var isMoving=false;
function Turns() {
if (isMoving == false) {
isMoving = true;
$("#contentBody").animate({
opacity:1
}, 800, function() {
isMoving = false;
});
for (var i = 0; i < $(".wheelItem").length; i  ) {
var target = $($(".wheelItem")[i]);
if (target.css("margin-left") == "0px" || target.css("margin-left") == "auto") {
target.css("z-index", "0");
target.animate({
width:"150px",
height:"100px",
marginTop:"75px",
marginLeft:"1000px"
}, 800);
} else if (target.css("margin-left") == "150px") {
target.css("z-index", "1");
target.animate({
width:"150px",
height:"100px",
marginTop:"75px",
marginLeft:"0px"
}, 800);
} else if(target.css("margin-left")=="400px"){
target.css("z-index", "2");
target.animate({
width:"250px",
height:"175px",
marginTop:"35px",
marginLeft:"150px"
}, 800);
}else if(target.css("margin-left")=="750px"){
target.css("z-index", "10");
target.animate({
width:"350px",
height:"250px",
marginTop:"0px",
marginLeft:"400px"
}, 800);
}else if(target.css("margin-left")=="1000px"){
target.css("z-index", "5");
target.a


原文出处:http://www.pengyaou.com/LegendsZ/File/2014/07/07/20140707231155892.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息