Webkit 浏览器未完全渲染背景图像

发布于 2024-08-13 03:59:19 字数 372 浏览 8 评论 0原文

我有一个简单的网页,其主 div 周围有居中的背景图像。背景图像在 IE 和 Firefox 中渲染良好,但在基于 Webkit 的浏览器(Chrome、Safari)上,背景图像在页面初始加载时仅部分渲染。这几乎就像浏览器停止尝试渲染它一样。如果我调整浏览器窗口的大小,或单击页面上的任何链接,背景图像将完全显示。这是网站:http://www.jnrtunes.com

我尝试过各种 CSS hack、预加载图像等,但似乎没有任何方法可以解决问题。有人遇到过类似的问题吗?我的 HTML 或 CSS 有问题吗?我是一个真正的 HTML/CSS 菜鸟,所以任何建议将不胜感激。谢谢!

I've got a simple webpage with a centered background image around the main div. The background image renders fine in IE and Firefox, but on Webkit-based browsers (Chrome, Safari), the background image only partially renders when the page is initially loaded. It's almost as if the browser just quits trying to render it. If I resize the browser window, or click on any of the links on the page, the background image shows fully. Here's the site: http://www.jnrtunes.com.

I've tried various CSS hacks, preloading images, etc and nothing seems to fix the problem. Has anyone had similar issues? Is there a problem with my HTML or CSS? I'm a realtive noob to HTML/CSS, so any advice would be appreciated. Thanks!

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

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

发布评论

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

评论(1

隐诗 2024-08-20 03:59:19

由于某种原因,是#wrapper div 上的overflow: auto 执行了此操作。别问我为什么,但似乎是你的问题。

For some reason, it's the overflow: auto on the #wrapper div that does it. Don't ask me why, but there seems to be your problem.

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