我对包含particle.js 的页脚有一点小问题。每当将particle.js 添加到页脚时,页脚下方就会出现一个3px 的空白。当particles.js 不在页脚中时不会发生这种情况,因此它必须与particles.js(或应用于它的css)直接相关。
我在 jsfiddle 中创建了一个模型,一个显示了particle.js 的问题,另一个显示了删除particle.js 后问题消失了。
使用particles.js:http: //jsfiddle.net/hsy8jbwc/2/
没有particle.js:http: //jsfiddle.net/hsy8jbwc/3/
#footer {position: relative; bottom: 0; width: 100%; height: 60px; line-
height: 60px; background-color: transparent}
#footer .row {display:flex; align-items:center; justify-content: space-
around;}
#footer-particles {position: absolute; height: 100%; width: 100%; background-
color: salmon; z-index: -1;}
<footer id="footer">
<div id="footer-particles"></div>
<div class="container">
<div class="row">
<span class="text-muted">FOOTER</span>
</div>
</div>
</footer>