网页大于主体高度?

问题描述 投票:0回答:2

这个网页正在测试中。http:/porkystuff.com有一个非常大的问题,网页比BODY和HTML标签大。我已经用Chrome和Firefox的开发工具检查过了,我已经尝试过在网页上添加 html, body{ height:100%; }.

css height webpage
2个回答
2
投票

知道了!!在你的CSS中,一个类名sidecontent高度是150%。

.sidecontent {
  position: absolute;
  width: 180px;
  height: 150%;
left: 820px;
top: 50px;
}

1
投票

在我的情况下,我只需要拉伸 bodyhtml 通过这些CSS技巧将标签改为全页大小。

html {
  min-height: 100% !important;
}

body {
  min-height: 100vh !important;
}

参考链接。https:/makandracards.commakandra39473-stretching-an-html-pag-to-full-height(全高)。

© www.soinside.com 2019 - 2024. All rights reserved.