第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

left的值在網(wǎng)頁(yè)里總是不對(duì),用的別人的模板

left的值在網(wǎng)頁(yè)里總是不對(duì),用的別人的模板

var myLeft;?? ? ? ?rePoint();? ? function rePoint() {?? ? ? ? var myLeftNumber = parseInt((document.body.clientWidth - 1100) / 2);?? ? ? ? if (myLeftNumber < 0) {?? ? ? ? ? ? myLeftNumber = 0;?? ? ? ? }? ? ? ? if (myLeft == myLeftNumber) {?? ? ? ? ? ? return;?? ? ? ? }? ? ? ? myLeft = myLeftNumber;?? ? }? hidden.css({width:"1100px",height:"375px",top:"0","left":"0px","opacity":0,}); hidden.stop(true,true).animate({width:"1100px",height:"375px",top:"0",left:"0px",opacity:1,},timer); curr.stop(true,true).animate({width:"1100px",height:"375px",top:"0","left":"50%",opacity:1,},timer); next.stop(true,true).animate({width:"1100px",height:"375px",top:"0","left":"0px","opacity":0,},timer,function(){next.find("span").css("opacity",0); isMoving = false;}); //prev ?--> ?curr ? ? prev中的圖片li輪換到curr的位置 ? ? ?其他一次輪換 prev.find("span").css("opacity",0); $(".main_banner_box li").find("p").css({"bottom":"-50px"});//所有標(biāo)題隱藏 prev.stop(true,true).animate({width:"1100px",height:"375px",left:"myLeft",top:0,opacity:1},timer,function(){ $(this).find("p").animate({"bottom":"0px"}); //當(dāng)前這張圖片的標(biāo)題運(yùn)動(dòng)出來(lái) }); index_2--; }else{ //執(zhí)行next 操作 if(index_2+2>=len){ //index_2 3 4 hidden=$("#imgCard"+(index_2+2-len));// 0 1 }else{ //index_2 0 1 2 hidden=$("#imgCard"+(index_2+2));// 2 3 4 } prev.css("z-index","1"); next.css("z-index","5"); //點(diǎn)擊next按鈕 ?讓next位置上的這張圖片 層級(jí)最高 顯示 curr.css("z-index","2"); hidden.css("z-index","1"); //當(dāng)index_2自增,各圖片往左運(yùn)動(dòng)效果 hidden.css({width:"1100px",height:"375px",top:"0px","left":"50%","opacity":0}); hidden.stop(true,true).animate({width:"1100px",height:"375px",top:"0px",opacity:1},timer); curr.stop(true,true).animate({width:"1100px",height:"375px",top:"0px",left:"0px",opacity:1},timer); //next ?--> ?curr ? ? next中的圖片li輪換到curr的位置 ? ? ?其他一次輪換 next.find("span").css("opacity",0); $(".main_banner_box li").find("p").css({"bottom":"-50px"});//所有標(biāo)題隱藏 next.stop(true,true).animate({width:"1100px",height:"375px",left:"myLeft",top:0,opacity:1,margin:"0 auto"},timer,function(){ $(this).find("p").animate({"bottom":"0px"}); //當(dāng)前這張圖片的標(biāo)題運(yùn)動(dòng)出來(lái) }); prev.stop(true,true).animate({width:"1100px",height:"375px",left:"0px",top:"0px",opacity:0},timer,function(){ isMoving = false; });? index_2++; }
查看完整描述

1 回答

?
lxmhh3788029

TA貢獻(xiàn)15條經(jīng)驗(yàn) 獲得超2個(gè)贊

我姑且一說哈,沒有實(shí)際運(yùn)行你的程序,只是掃了一下發(fā)現(xiàn)left:"myLeft"這樣寫是不對(duì)的,你的myLeft是一個(gè)變量,不用加引號(hào),就寫left:myLeft就行了

查看完整回答
反對(duì) 回復(fù) 2017-08-07
  • 1 回答
  • 0 關(guān)注
  • 1546 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)