为什么我的内部 CSS 在站点部署后没有加载?

Why is my internal CSS not loading after site deployment?

所以我使用 css、javascript 和 html 制作了这个网站。在我的本地系统上,我添加到我的 html 文件中的内部 css 可以完美加载。但是当我在线部署它时(我使用 netlify),内部 css 似乎没有加载,我看不到任何内容。

我什至试图删除那个内部 css 并制作另一个文件和 link 到我的 html 文档,仍然没有工作的迹象。现在对我来说太头脑风暴了,因为我找不到任何解决方案。

我正在分享文件的links,如果你们中的任何人愿意帮助我,好吗?

gsap.to('#moon',{
    scrollTrigger:{
      scrub: 1
    },
    scale: 1.5,
  })
  gsap.to('#bg',{
    scrollTrigger:{
      scrub: 1
    },
    scale: 1.2,
  })
  gsap.to('#santa',{
    scrollTrigger:{
      scrub: 1
    },
    scale: 1.5,
    y: -500,
    x: 2400
  })
  gsap.to('#tree',{
    scrollTrigger:{
      scrub: 1
    },
    x: -250
  })
  gsap.to('#cloud1',{
    scrollTrigger:{
      scrub: 1
    },
    x: -150
  })
  gsap.to('#cloud2',{
    scrollTrigger:{
      scrub: 1
    },
    x: 200
  })
  gsap.to('#text1',{
    scrollTrigger:{
      scrub: 1
    },
    y: -950
  })
  gsap.to('#text2',{
    scrollTrigger:{
      scrub: 1
    },
    y: -950 
  })
@import url('https://fonts.googleapis.com/css2?family=Frijole&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Balsamiq+Sans&display=swap');

*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Frijole';
  font-weight: 200;
}

body{
  /* background: rgb(97, 0, 0); */
  height: 200vh;
}

section{
  position: fixed;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

section::after{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(0, 10, 68);
  mix-blend-mode: screen;
}

section img#bg{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

section img#moon{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

section img#cloud1{
  position: absolute;
  top: 100px;
  left: 50px;
  max-width: 600px;
  z-index: 2;
}

section img#cloud2{
  position: absolute;
  top: 200px;
  right: 50px;
  max-width: 600px;
  z-index: 2;
}

section img#santa{
  position: absolute;
  bottom: 50px;
  left: -600px;
  z-index: 1;
  max-width: 600px;
  transform: scale(0.5);
}

section #tree{
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 266px;
  background: url(../images/tree.png);
  background-position-y: 266px;
  z-index: 10;
}

section #text1{
  position: absolute;
  bottom: -500;
  left: 0;
  width: 100%;
  text-align: center;
  color: #fff;
  text-shadow: 2px 2px 12px #000;
  font-size: 5.5em;
  z-index: 9;
}

section #text2{
  position: absolute;
  bottom: -600;
  left: 0;
  width: 100%;
  text-align: center;
  font-family: 'Balsamiq Sans', sans-serif;
  transition: .093s;
  color: #fff;
  text-shadow: 2px 2px 12px #000;
  font-size: 2em;
  z-index: 9;
}
<html>
  <head>
    <title>Merry Christmas</title>
    <link rel="stylesheet" href="css/style.css" type="text/css">
    <link href='https://fonts.googleapis.com/css?family=Balsamiq Sans' rel='stylesheet'>
    <link href='https://fonts.googleapis.com/css?family=Frijole' rel='stylesheet'>
    <link rel="icon" href="images/favicon.png" type="image/png" size="32x32">
    <link rel="stylesheet" type="text/css" href="css/snow.css">
    <style>
        .snow, .winter-is-coming {
          z-index: 100;
          pointer-events: none;
            }
        .winter-is-coming {
          overflow: hidden;
          position: absolute;
          top: 0;
          height: 100%;
          width: 100%;
          max-width: 100%;
          background: url(../images/bg.jpg);
        }   
        .snow {
          position: absolute;
          top: 0;
          right: 0;
          bottom: 0;
          left: 0;
          animation: falling linear infinite both;
          transform: translate3D(0, -100%, 0);
        }
        .snow--near {
          animation-duration: 10s;
          background-image: url("https://dl6rt3mwcjzxg.cloudfront.net/assets/snow/snow-large-075d267ecbc42e3564c8ed43516dd557.png");
          background-size: contain;
        }
        .snow--near + .snow--alt {
          animation-delay: 5s;
        }
        .snow--mid {
          animation-duration: 20s;
          background-image: url("https://dl6rt3mwcjzxg.cloudfront.net/assets/snow/snow-medium-0b8a5e0732315b68e1f54185be7a1ad9.png");
          background-size: contain;
        }
        .snow--mid + .snow--alt {
          animation-delay: 10s;
        }
        .snow--far {
          animation-duration: 30s;
          background-image: url("https://dl6rt3mwcjzxg.cloudfront.net/assets/snow/snow-small-1ecd03b1fce08c24e064ff8c0a72c519.png");
          background-size: contain;
        }
        .snow--far + .snow--alt {
          animation-delay: 15s;
        }
        @keyframes falling {
          0% {
            transform: translate3D(-7.5%, -100%, 0);
          }
          100% {
            transform: translate3D(7.5%, 100%, 0);
          }
        }
    </style>
  </head>
  <body>
    <section>
      <div class="winter-is-coming">
  
        <div class="snow snow--near"></div>
        <div class="snow snow--near snow--alt"></div>
        
        <div class="snow snow--mid"></div>
        <div class="snow snow--mid snow--alt"></div>
        
        <div class="snow snow--far"></div>
        <div class="snow snow--far snow--alt"></div>
      </div>


      <img src="images/bg.jpg" id="bg">
      <img src="images/moon.png" id="moon">
      <img src="images/cloud1.png" id="cloud1">
      <img src="images/cloud2.png" id="cloud2">
      <img src="images/santa.png" id="santa">

      <div id="tree"></div>

      <h2 id="text1">Merry Christmas!</h2><br>
      <h4 id="text2">And a very happy new year from us! Enjoy Holidays!!</h4>
      
    </section>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.1/gsap.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.1/ScrollTrigger.min.js"></script>
    <script src="scripts/script.js"></script>
  </body>
</html>

您有 class .winter-is-coming 和 CSS z-index:100;。将其更改为 z-index:1; 那么现在应该一切正常了。