1.模仿fade in(),fade out().
原理:setInterval ( "opacity++透明度“函数,时间间隔)
100 && (alpha = 100);
aImg[index].style.opacity = alpha / 100;
aImg[index].style.filter = "alpha(opacity = " + alpha/100 + ")";
alpha == 100 && clearInterval(timer);
},40)
}
关键点:obj.currentStyle[attr] ; getComputedStyle(obj,null)[attr] ;
错误参数");
}
}