是否可以使用 jQuery/CSS 做一些看起来像网站 flash 介绍的事情?在向用户显示内容之前,我只需要显示带有 Logo 的黑屏几秒钟。我的意思是,我可以尝试只显示一个 div 的内容,但我不知道如何让那个 div 适合整个屏幕……就像:
$(document).ready(function() {
$(body not(#intro-covering-page)).css("display", "none");
$('#intro-covering-page').delay(2000).fadeOut();
}); /* I still haven't figured how to properly make this work*/
也许在主容器之前有。有什么想法吗?
最佳答案
让你的 css 隐藏 #intro-covering-page
#intro-covering-page {
display: none;
}
然后用js
$(function() { // that's short for .ready()
$('#intro-covering-page').delay(2000).fadeIn();
});
当然,如果我们想确定用户的 js 状态,我们会做类似的事情
.js #intro-covering-page {
display: none;
}
JavaScript:
$(function() {
$('html').addClass('js');
$('#intro-covering-page').delay(2000).fadeIn();
});
关于jquery - 像 jQuery 一样的 Flash 网站介绍?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6337324/