【问题标题】:Particleground.js: how to make website scrollableParticleground.js:如何使网站可滚动
【发布时间】:2017-12-18 15:44:15
【问题描述】:

我正在做一个网站并打算使用

Particleground.js

我网站入口处的插件。我已经下载了它here 并根据演示文件使用。但是在演示中只有一个<div>,所以他们有一个全屏粒子+文本。虽然我需要that 之类的东西,即顶部带有粒子的可滚动登录页面。提前感谢您的帮助!

这就是我的容器现在的样子:

<div id="particles">
  <div class="uk-section uk-uk-padding-medium" id="intro">
    <div class="uk-container uk-padding-large">
      <!-- content here -->
    </div>
  </div>
</div>

然后跟随下一个容器,我不能在那里滚动!

这里是 CSS 设置:

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1;
}

#particles {
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

#intro {
  position: absolute;
  left: 0;
  top: 50%;
  padding: 0 20px;
  width: 100%;
  text-align: center;
}

【问题讨论】:

    标签: javascript jquery html css particles


    【解决方案1】:

    所以,我们找到了问题所在(很简单)。在 CSS 中应该是这样的:

    html, body {
      width: 100%;
      height: 100%;
    /*   overflow: hidden; */
    }
    

    这个overflow:hidden;让事情变得如此复杂,所以删除它吧。

    【讨论】:

      猜你喜欢
      • 2023-03-15
      • 1970-01-01
      • 1970-01-01
      • 2014-08-06
      • 1970-01-01
      • 2021-01-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多