嘗試了幾個選項後,我無法使文本淡入淡出。 無論我嘗試,整個動畫只是凍結,加入這樣的事情以下演示中的FadeIn和fadeOut
$("#headertxt".fadeIn('slow').css({"display" : "block"});
或
$("#headerimg" + currentContainer).fadeOut(function() {
setTimeout(function() {
$("#headertxt".fadeIn({"display" : "block"});
animating = false;
}, 500);
});
$("#headerimg" + currentContainer).fadeOut(function() {
setTimeout(function() {
$("#headertxt".fadeOut({"display" : "block"});
animating = false;
}, 5000);
});
原來這是demo
您應該減少代碼在你的問題的準系統例如工作。 http://sscce.org/ – j08691
你能把你的小提琴切成只是你問的部分嗎? –