图片交替渐变出现的效果实现
http://my.oschina.net/HeYuhui/blog/632467
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
Js代码 function change2(){ document.getElementById("img2").style.zIndex='2'; document.getElementById("img1").style.zIndex='1'; document.getElementById("img1").style.opacity='1'; $("#img2").animate({opacity:'0'},2000); } function change3(){ document.getElementById("img1").style.zIndex='2'; document.getElementById("img2").style.zIndex='1'; $("#img1").animate({opacity:'0'},2000); document.getElementById("img2").style.opacity='1'; } function change4(){ setTimeout("change2()",5000); setTimeout("change3()",12000); setTimeout("change4()",14000); } |