アニメーションを (相互に) 実行するのに時間がかかりすぎていることがわかりました。一度に複数のアニメーションをオフに設定することは実際には可能ですか?
公開されたコピーhttp://colourednoise.co.uk/closing/
現在何が起こっているか:フェード イン > 展開 > フェード アウト- ただし、最初の 2 つのステップが少し遅れているようです..それらをマージできますか? つまり、全体的によりスムーズなエクスペリエンスを提供するために、拡張し始めている間、わずかにフェードします。
jQuery(document).ready(function() {
positionElements();
var fontSize = 60,
goodbyeFadeIn = 1000,
goodbyeAnimation = 1500,
goodbyeFadeOut = 1000;
jQuery('#goodbye').fadeIn(goodbyeFadeIn, function() {
jQuery(this).animate({
fontSize: fontSize
}, goodbyeAnimation, function() {
jQuery(this).fadeOut(goodbyeFadeOut, function() {
jQuery('#content').fadeIn();
});
});
});
});
jQuery(window).resize(positionElements);
function positionElements() {
var documentWidth = jQuery(document).width(),
documentHeight = jQuery(document).height(),
goodbyeWidth = jQuery('#goodbye').width(),
goodbyeHeight = jQuery('#goodbye').height(),
contentWidth = jQuery('#content').width(),
contentHeight = jQuery('#content').height();
jQuery('#goodbye').css({
left: (documentWidth / 2) - (goodbyeWidth / 2),
top: (documentHeight / 2) - (goodbyeHeight / 2)
});
jQuery('#content').css({
left: (documentWidth / 2) - (contentWidth / 2),
top: (documentHeight / 2) - (contentHeight / 2)
});
}
フェードイン アニメーションをエキスパンドとミックスしたいもう 1 つの理由は、エキスパンド アニメーションが非常にぎくしゃくしていることがわかっているためです。