ParticlesJS Высота / конкретный div только - PullRequest
0 голосов
/ 28 августа 2018

Я пытаюсь ограничить частичку canvas только частью страницы. Я пытался установить высоту вручную безрезультатно.

Index.html:

            <div id="particles-js"></div>

        <div class="jumbotron jumbotron-fluid" id="jumbo">
            <div class="container">

                <h1 class="display-4">Test</h1>
                <p class="lead">This is a modified jumbotron that occupies the entire horizontal space of its parent.</p>
            </div>
        </div>

Index.css:

#particles-js {
  background: white;

  position: absolute;
  z-index: 0 !important;
}
#jumbo {

  background: rgba(255, 255, 255, 0.5);
}
canvas {
  display: block;
  position: fixed;
  z-index: -1;
}
...