慕仔3905718
2018-05-23 17:51
if (atr=="opacity") {
obj.style[atr]=(cur+speed)/100;
console.log(obj.style.filter);
console.log(obj.style[filter]);
obj.style.filter='alpha(opacity:'+cur+speed+')';
//obj.style[filter]='alpha(opacity:'+cur+speed+')';
}else{
obj.style[atr]=cur+speed+"px";
}
obj.style[filter]改为obj.style['filter'],obj.style.filter === obj.style['filter']
JS动画效果
113925 学习 · 1443 问题
相似问题