0
点赞
收藏
分享

微信扫一扫

图片交替渐变出现的效果实现


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);
}

举报

相关推荐

0 条评论