jQuery 同时淡入淡出图像 [英] jQuery Fade Images simultaneously

查看:43
本文介绍了jQuery 同时淡入淡出图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 jQuery 淡入淡出图像.

I am using jQuery to cross fade images.

这是我使用的代码:

$('.' + currentimage).fadeOut('slow', function() {
    $('.' + selectedimage).fadeIn('slow');
});

这是在所选图像开始淡入之前将第一张图像淡出 100%.当第一张图像淡出 60-70% 时,是否有一种简单的方法可以开始淡入第二张图像?

This is fading the first image out 100% before the selected image begins to fade in. Is there a simple way to begin fading in the second image when the first image has faded out by say 60-70%?

所有好的答案.我认为还有一个问题.我的图像没有重叠显示 - 一次只能看到 1 张图像.

All good answers. I think there is a further problem. My images are not showing up on top of each other - and only 1 image is visible at a time.

推荐答案

尝试

$('.' + currentimage).fadeOut('slow');
$('.' + selectedimage).delay(100).fadeIn('slow');

这篇关于jQuery 同时淡入淡出图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆