亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

我復制了一遍函數,但總顯示Cannot read property 'left' of underdifined是腫么回事

我復制了一遍函數,但總顯示Cannot read property 'left' of underdifined是腫么回事

function ani (off) {
??????????????? if (off == 0) {
??????????????????? return;
??????????????? }
??????????????? animated = true;
??????????????? var rtime = 300;
??????????????? var rinteval = 10;
??????????????? var rspeed = off/(rtime/rinteval);
??????????????? var left = parseInt(rolist.style.left) + off;
??????????????? var gos = function (){
??????????????????? if ( (speed > 0 && parseInt(rolist.style.left) < left) || (rspeed < 0 && parseInt(rolist.style.left) > left)) {
??????????????????????? rolist.style.left = parseInt(rolist.style.left) + rspeed + 'px';
??????????????????????? setTimeout(go, rinteval);
??????????????????? }
??????????????????? else {
??????????????????????? rolist.style.left = left + 'px';
??????????????????????? if(left>-20){
??????????????????????????? rolist.style.left = -200 * len + 'px';
??????????????????????? }
??????????????????????? if(left<(-200 * len)) {
??????????????????????????? rolist.style.left = '-200px';
??????????????????????? }
??????????????????????? animated = false;
??????????????????? }
??????????????? }
??????????????? gos();
??????????? }


正在回答

1 回答

看你的圖片列表樣式中有沒有設置定位,有沒有left屬性

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

我復制了一遍函數,但總顯示Cannot read property 'left' of underdifined是腫么回事

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號