演示: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