首页 > 解决方案 > 垂直滚动条未出现在网站上

问题描述

我不知道为什么垂直滚动条没有显示在我的网站上。它曾经工作正常,但我最近不得不重新上传网站,之后滚动条不再工作,即使所有代码都应该完全相同:

http://www.atnight.net.nz

这是我的 layout.scss 文件中的主体 HTML

html,
body {
  @include box-sizing(border-box);
  height: 100%;
  font-size: 99%;
}

body {
  display: block;
  background: $dark-grey url('../img/backgrounds/broken_noise.png') repeat;
}

.row {
  @include col-container;
  margin: auto;
}

/*Dark Scrollbar */
@media screen and (-webkit-min-device-pixel-ratio:0) {
  ::-webkit-scrollbar {
    width: .85em;
    height: .85em;
  }

  ::-webkit-scrollbar-track {
    background-color: $grey-500;
  }

  ::-webkit-scrollbar-thumb:vertical {
    height: 5em;
    background-color: $grey-900;
  }
}

标签: htmlcssscroll

解决方案


这种行为是由于(从)class上的:<body>_utilities.scss

.nonscroll {
  overflow: hidden;
}

HTML

<body onload="init();" class="onePage nonscroll HomePage no-sidebar" dir="ltr">

推荐阅读