import '../../css/bootstrap.less'; import 'bootstrap/dist/js/bootstrap.js'; import '../../css/public.css'; import '../../css/main_banner.css'; import '../../js/public.js'; import '../../js/main_banner.js'; import '../../css/service/highTechCognizance.css'; (function(){ var t=1;//判断现在在中间的是第几个div $(".pro_rotate>div>div").click(function(){ t=$(this).attr("value")-(-1); $(".problem_left").children("div").eq(t).addClass("active_div").siblings().removeClass("active_div"); $(this).parent().addClass("active").siblings().removeClass("active"); var rotval=$(this).attr("value"); var divval=$(".pro_rotate").attr("rota"); var rotdiv=$(".pro_rotate>div"); $(".pro_rotate").css({"transform":"rotate("+(divval-(-rotval*20))+"deg)"},500); for(var i=0;i3){ t=3; }else{ $(".pro_rotate>div>div").eq(t).click(); } // $(".pro_rotate>div>div").eq(t).click(); } } /*注册事件*/ if(document.addEventListener){ document.addEventListener('DOMMouseScroll',scrollFunc,false); }//W3C window.onmousewheel=document.getElementById("rotate_four").onmousewheel=scrollFunc;//IE/Opera/Chrome function div_position(){ //var problem_textdiv=$(".problem_left>div"); //for(j=0;jdiv.active_div").height(); //$(".problem_left>div.active_div").animate({"bottom":(450-act_divheight)/2},"slow"); $(".problem_left>div").stop(false,true); $(".problem_left>div").fadeOut("fast"); $(".problem_left>div.active_div").fadeIn("slow"); } div_position(); })(); (function(){ var htmlwidth=$(document).width(); $(".btn_div>div").width((htmlwidth-1200)/2); $(".leftdiv").css({"left":-(htmlwidth-1200)/2}); $(".rightdiv").css({"right":-(htmlwidth-1200)/2}); var $imgBig=$('.ct_img_big'), $btnNext=$('.btn_next1'), $btnPre=$('.btn_pre1'), $CT = $('.carousel'), $imgSmall=$('.ct_img_small'); var $imgWidth=$imgBig.find('li').width();//获取图片的宽度; var $imgLength=$imgBig.children().length;//获取克隆前的图片的长度; // 拷贝第一张和最后一张;把最后一张图放在最前面;把最前面的图放在最后; var $firstImg=$imgBig.find('li'), $lastImg=$imgBig.find('li'); $imgBig.prepend($lastImg.clone()); $imgBig.append($firstImg.clone()); //设置imgBig clone后的宽度 $imgBig.width( $imgWidth*$imgBig.children().length)//这时的个数是添加完以后的个数 $imgBig.css({'left':'-='+$imgWidth+'px'})//把第一张图放入可视区 var pageIndex = 0 ; //img的下标; var isAnimate = false//防止重复点击 上锁 $btnNext.on('click',function(e){ e.preventDefault(); playNext(); setTimeout(function(){ },1500) }); $btnPre.on('click',function(e){ e.preventDefault() playPre(); setTimeout(function(){ },1500) }); $imgSmall.find('li').on('click',function(){ var smallIdx= $(this).index(); if(smallIdx>pageIndex){ playNext(smallIdx-pageIndex) } else if(smallIdx