好的,所以我将使用 particleground( https://github.com/jnicol/particleground ) 作为页面的背景。
我已经添加了粒子地面,但是,它出现在页面所有内容的上方。 有点像这样:-
我该怎么做才能将其作为背景? 这是代码的一部分。
<body>
<?php include 'nav.php'; ?>
<div class="container-fluid">
<div id="particle">
<div class="row">
<div class="col-md-3 col-sm-12 col-xs-12">
<img src="images/logo.png">
</div>
<div class="col-md-6 col-sm-12 col-xs-12">
<div class="college_name">
IEC College of Engineering and Technology
<br>
presents
</div>
</div>
</div>
<br>
<br>
<div class="row">
........
最佳答案
为了解决这个问题,我在内容后面写了粒子 ID。例如,如果我有这个:
<div class="title">
<p>Title</p>
</div>
<!-- Calling the particle after the content, so it will be behind the content.
-->
<div id="particles"></div>
还要确保在 CSS 中放置一个 id #particles 并声明 at 的宽度和高度为 100%。例如:
#particles {
width: 100%
height: 100%
position: fixed;
}
关于jquery - 将粒子背景作为页面的背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35602219/