// javascript document $(document).ready(function() { var w=window.innerwidth || document.documentelement.clientwidth || document.body.clientwidth; var h=window.innerheight || document.documentelement.clientheight || document.body.clientheight; //滑动动画 var indexprow=$(".about2 .bottom").width()/3 var indexprol=$(".about2 .bottom ul li").length; $(".about2 .bottom ul li").css({"width":indexprow}); $(".about2 .bottom ul").css({"width":indexprow*indexprol,"margin-left":-indexprow}); $(".about2 .bottom ul li").first().before($(".about2 .bottom ul li").last()); $(".about2 .bottom ul li").first().before($(".about2 .bottom ul li").last()); k=0; i=0; $(".about2 .top p").eq(0).addclass("active"); $(".about2 .bottom li b").eq(2).addclass("active") $(".about2 .bottom li b h3").eq(2).css({"opacity":1,"-webkit-transform":"translate(-50%,-50%)","transform":"translate(-50%,-50%)"}) //左滑动动画 function indexproleft(i){ $(".about2 .bottom ul").animate({"margin-left":0},500,function(){ $(".about2 .bottom ul").css({"margin-left":-indexprow}); $(".about2 .bottom ul li").first().before($(".about2 .bottom ul li").last()); }); if(k>0){ k-- }else{ k=indexprol-1 } $(".about2 .bottom li b").removeclass("active").eq(i+1).addclass("active") } //右滑动动画 function indexproright(i){ $(".about2 .bottom ul").animate({"margin-left":-2*indexprow},500,function(){ $(".about2 .bottom ul").css({"margin-left":-indexprow}); $(".about2 .bottom ul li").last().after($(".about2 .bottom ul li").first()); }); if(k