那我說下吧,第一個功能的最后一張圖,第一個if(isgo == false){} 的“{}”括號少了 }號 if(isgo == false) {
count++;
//transform:translate():含義:變動,位移;如下表示向右位移120像素,如果向上位移,
// 把后面的“0”改個值就行,向左向下位移則為負“-”。
oulimg.style.transform = "translate(" + -800 * count + "px)";
if (count >= oliimg.length - 1) {
count = oliimg.length - 1;
isgo = true;
}
}
else{
count--;
oulimg.style.transform = "translate(" + -800 * count + "px)";
if(count <=0){
count = 0;
isgo = false;
}
}