有没有一种方法可以淡入和淡出超大尺寸的加载器div, #supersize -loader



我对使用jquery的知识非常有限,通常可以蒙混过关,但我有一个项目,客户希望"预加载"图像在超大型幻灯片序列开始之前逐渐淡入和淡出。我在3.2.7 js文件中看到了初始化和删除div的行,但是我可以修改它来放置一个fadeIn和fadeOut每个大约1.5秒吗?

$('#supersized-loader').remove();

你试过谷歌一下吗?

http://api.jquery.com/fadeIn/

http://api.jquery.com/fadeOut/

// To fade in
$('#supersized-loader').fadeIn();
// To fade out
$('#supersized-loader').fadeOut();
// Chain commands...
$('#supersized-loader').hide().fadeIn().fadeOut().remove();
// ...or possibly
$('#supersized-loader').hide().fadeIn().fadeOut(function(){
    // Remove the layer.
    $(this).remove();
});

相关内容

最新更新