制作 100% 高度的网站,最小高度:100%;,滚动时仍然不显示

发布于 2024-12-22 21:54:07 字数 162 浏览 2 评论 0原文

我正在改编这个 - quintadobode.thetwilightwalkers.com - html 模板,当我滚动(在包含内容的页面之一,如 oprojecto 等)时,没有背景。我正在使用 .expandheight 类,其 min-height: 100%;,这种情况仍然会发生。这让我发疯,请帮忙。

I'm adapting this - quintadobode.thetwilightwalkers.com - html template, and when I scroll (on one of the pages with content, like o projecto, etc.) there's no background. I'm using an .expandheight class, with min-height: 100%;, and that still happens. It's driving me nuts, please help.

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

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

发布评论

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

评论(3

美羊羊 2024-12-29 21:54:07

您在 main 元素上设置了 height: 100%。如果你删除它,对我来说效果很好。

You have height: 100% set on your main element. It works fine for me if you remove this.

肤浅与狂妄 2024-12-29 21:54:07

我还没有真正测试过你的 CSS,但是如果你从 #main 块样式中删除 height:100% ,对于像“O Projecto”这样的页面,背景会一直向下,是吗?解决你的问题吗?

I haven't really tested your CSS, but if you remove the height:100% from your #main block styles, the background will go all the way down for pages like "O Projecto", does that solve your problem?

思念绕指尖 2024-12-29 21:54:07

您还需要在 htmlbody 上设置 min-height:100%

You need to set min-height:100% on html and body as well.

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