プリローダーを作成しようとしていますが、現在このコードがありますが、ページが読み込まれる前にプリローダーが表示されていません。プリローダーJavaScript
$(document).ready(function(){
$(".preloader-wrapper").show();
$("body").hide();
});
$(window).load(function(){
$(".preloader-wrapper").fadeOut("slow", function(){
$("body").fadeIn("slow");
});
});
編集:入手しました。
setTimeout(function() {
$('#preloader').fadeOut('slow', function() {
$(this).remove();
});
}, 2000);
#preloader {
position: fixed;
left: 0;
top: 0;
z-index: 999;
width: 100%;
height: 100%;
overflow: visible;
background: #333 url('http://files.mimoymima.com/images/loading.gif') no-repeat center center;
}
何あなたのHTMLは次のように見えますか?あなたは体を隠しているので、JSFiddleまたはスタックスニペットをhttps://blog.stackoverflow.com/2014/09/introducing-runnable-javascript-css-and-html-code-snippets/ –
に設定できますか? – epascarello