[英]Disable scrollbar while splshpage loading
I have a script for splash/intro page loader 我有一个用于启动/介绍页面加载器的脚本
$(function(){
setTimeout(function() {
$('#splash').fadeOut(500);
}, 6000);
});
The script will hide the intro page after 6sec. 该脚本将在6秒后隐藏介绍页。 But the problem is scrollbar stil visible and i want hide the scrollbar while the intro page onload for 6sec. 但是问题是滚动条仍然可见,我想在介绍页面加载6秒时隐藏滚动条。
need advice... thank you 需要建议...谢谢
make your 做你的
html, body{
overflow: hidden;
}
and 和
$(function(){ setTimeout(function() {
$('#splash').fadeOut(500); }, 6000);
$(' html, body').css({overflow: 'auto'});
});
this will turn back the scroll on after 6s. 这将在6秒后重新打开滚动。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.