Javascript 我能';t将粒子集成到wordpress主题

Javascript 我能';t将粒子集成到wordpress主题,javascript,wordpress,Javascript,Wordpress,所以,我想在我的wordpress主题中添加一个降雪效果。为此,我将文件“particles.js”、“app.js”添加到“theme/include/”文件夹中,并创建了一个“stylesnow.css”。 主题是“末日游戏” 问题是,正如图中所示,粒子不会显示在整个站点上,而是显示在顶部 以下是我添加到的代码: header.php: <!DOCTYPE html> <html> <head> <link rel="styles

所以,我想在我的wordpress主题中添加一个降雪效果。为此,我将文件“particles.js”、“app.js”添加到“theme/include/”文件夹中,并创建了一个“stylesnow.css”。 主题是“末日游戏”

问题是,正如图中所示,粒子不会显示在整个站点上,而是显示在顶部

以下是我添加到的代码:

header.php:

<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="/include/stylesnow.css">
</head>
<body>
  <div id="particles-js"></div>
  </div>
  <script src="https://code.jquery.com/jquery-3.5.1.js"
  integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc="
  crossorigin="anonymous"></script>
  <script type="text/javascript" src="/include/particles.js"></script>
  <script type="text/javascript" src="/include/app.js"></script>
</body>
</html>
snowstyle.css:

#particles-js
{
    position: fixed;
    width: 100%;
    height: 100vh;
    /*opacity: 0;*/
    pointer-events: none;
    z-index: 100000; /*top*/
    transition: 0.5s;
}
顺便说一句,我是个乞丐

#particles-js
{
    position: fixed;
    width: 100%;
    height: 100vh;
    /*opacity: 0;*/
    pointer-events: none;
    z-index: 100000; /*top*/
    transition: 0.5s;
}