5
我試圖在加載新頁面時將頁面動畫化。我要使用的效果與此網站上使用的過程類似http://www.whitefrontier.ch/。我更像一個設計師,而不是開發人員,所以我沒有這樣的運氣。以下是我認爲最接近正確的兩個解決方案。我意識到在那個網站上,他們正在使用fancybox作爲預加載器。我是否需要fancybox才能獲得理想的效果?如何在新頁面預加載後在卸載時對頁面進行動畫製作(jQuery)
$(window).load(function() {
$('a').animate({right: '250px'},"slow");
});
$(window).on('beforeunload', function(){
$('a').animate({right: '250px'},"slow");
});
這是一個很好的資源:http://designhuntr.com/display-animation-while-page-loading-using-jquery/。這顯示瞭解決您的問題的兩種不同方式。 – BIW
'花式框'用於顯示圖像幻燈片放映。 –