简体   繁体   English

我的网站底部有时会出现一个白色的条形,该如何去除?

[英]A white bar appears at the bottom of my website sometimes, how to get rid of it?

I have a personal website I'm working on where the background image moves with the time of day. 我有一个个人网站,我正在研究背景图像在一天中的哪些时间移动。 At the bottom of the page, I have jQuery UI tabs going for my menu. 在页面底部,我的菜单有jQuery UI选项卡。

The background image moves up and down, this is my function I wrote: 背景图像上下移动,这是我写的函数:

// Move background based on current time
function backgroundMove() {
var windowHeight = $(window).height();
var imageHeight = 1200; // Background image height

    //CODE

    $('body').attr("style", "background-position: 0px " + movement + 'px');
}

Now on my local machine, this method works flawlessly, the background moves as it should. 现在,在我的本地计算机上,此方法可以完美运行,背景按预期移动。 But when I put it online, sometimes a solid white bar shows up at the bottom. 但是,当我将其放在网上时,有时底部会出现白色实心条。 The background image is where it should be, position-wise, but it gets cut off with this bar and thus you can't see my menu anymore (it is all-white tabs). 背景图像是应按位置放置的位置,但是它被该栏切断了,因此您不再能看到我的菜单(它是全白色的标签)。

Since it doesn't happen consistently I've had trouble identifying the problem. 由于不会一直发生,因此我很难确定问题所在。 Does anyone have any ideas as to what it might be, how I might fix it so it doesn't happen again? 是否有人对它可能是什么有任何想法,我将如何解决它以便使其不再发生?

Try adding this: 尝试添加以下内容:

height:100%; 高度:100%; overflow:hidden; 溢出:隐藏

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM