【问题标题】:Empty space under my main page footer - Wordpress [closed]我的主页页脚下的空白空间 - Wordpress [关闭]
【发布时间】:2016-02-04 19:03:39
【问题描述】:

我有一个奇怪的问题,

我的主页(仅限)在页脚下显示很长的空白区域,当我仅使用 Google Chrome 时会发生这种情况。 IE、Firefox 运行没有任何问题。

PS: 1 - 当我将主页转到静态内容页面时,这个奇怪的空间会从 Google Chrome 中消失。

2 - 我尝试禁用所有插件,但仍然遇到同样的问题

那么如何解决这个问题呢?

Site URL

【问题讨论】:

  • 请在您的问题中发布相关代码。

标签: html css wordpress footer space


【解决方案1】:

问题似乎在于每个 article 中的 .screen-reader-text 类将项目保留在主页流中。

尝试将 css 更新为:

.says, .screen-reader-text {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

请记住,这也会影响.says 类。如果需要,只需将 .screen-reader-text 移动到它自己的类中。

.says {
      clip: rect(1px, 1px, 1px, 1px);
      height: 1px;
      overflow: hidden;
      position: absolute !important;
      width: 1px;
}
.screen-reader-text {
      position: absolute;
      left: 0;
      top: 0;
      width: 1px;
      height: 1px;
      overflow: hidden;
}

【讨论】:

  • 很抱歉,当我使用您的解决方案时,左侧有一个不同的页面,请再次检查 URL。
  • 抱歉,我的浏览器没有显示左滚动条。尝试将 .screen-reader-text 上的 left 属性更改为 0。我会更新答案以反映。
  • 真的太棒了,你救了我的命,真的谢谢。
猜你喜欢
  • 1970-01-01
  • 2016-03-15
  • 2018-12-12
  • 2021-02-17
  • 2016-12-08
  • 1970-01-01
  • 2013-05-09
  • 1970-01-01
  • 2017-12-30
相关资源
最近更新 更多