在 webkit 浏览器中使用 960.gs CSS 背景颜色未填满屏幕

发布于 2024-09-03 23:47:17 字数 390 浏览 1 评论 0原文

使用 960.gs,我有一个登录屏幕页面,该页面使用 div 作为带有背景图像的登录表单。该 div 显示在标题下方,该标题将其向下推到浏览器窗口的中间。在 CSS 中,我设置主体颜色:

body {
    background-color: #594c34;
    margin: 0;
    padding: 0;
    font-family: "Arial";
}

...对于登录面板/内容存在的 div 底部,该颜色效果很好,但在其下方,页面背景在第一次加载时为白色。一旦我刷新页面,背景颜色就会填充浏览器。这只发生在 webkit 浏览器 (Chrome/Safari) 中。

如何从一开始就让页面背景颜色填充浏览器窗口?这是 960.gs 问题还是其他问题?

Using 960.gs, I have a page which is a login screen which uses a div for the login form with a background image. This div is displayed below a header which pushes it down to the middle of the browser window. In the CSS I am setting the body colour:

body {
    background-color: #594c34;
    margin: 0;
    padding: 0;
    font-family: "Arial";
}

...which works fine for as far down as the bottom of the div for the login panel/content exists, but below that the page background is white on the first time it is loaded. Once I refresh the page the background colour fills the browser. This only occurs with webkit browsers (Chrome/Safari).

How can I get the page background colour to fill the browser window from the start? Is this a 960.gs issue or something else?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

赠意 2024-09-10 23:47:17

如果没有看到 HTML 或页面本身,我会认为这听起来像是浏览器问题。您可以通过将背景颜色移至 HTML 元素来解决此问题。

Without seeing the HTML or the page itself I would think it sounds like a browser problem. You may be able to work around this by moving the background color to the HTML element.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文