本文介紹了加載后,jQuery 淡入網站/內容?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
是否有任何教程或插件可以在網站正確加載后將其淡入視野,以限制任何不和諧等,從而使內容基本流暢?
Are there any tutorials or plugins for fading a site into view once its loaded properly, to limit any jarring etc, so the content appears smoothly basically?
我想如果它只是一個特定區域會更容易,因為頁眉或頁腳已經被緩存,從以前的頁面......
I suppose it would be easier if it was just a specific area, as a header or footer will already be cached, from previous pages...
例如帶有各種縮略圖的投資組合頁面,它們只有在準備好后才會流暢顯示.
For example a portfolio page with various thumbnails, they only appear smoothly when ready.
這個可以嗎?
感謝您的幫助:)
推薦答案
是的,用 div 包裝你的內容(例如 <div id="main-content">
)并在你的css 把這個:
Yes, wrap your content with a div (e.g. <div id="main-content">
) and in your css put this:
div#main-content { display: none; }
然后使用這個腳本.
$(document).ready(function() {
$('#main-content').fadeIn();
});
這篇關于加載后,jQuery 淡入網站/內容?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!