<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="style.css" />
  </head>
  <body></body>
  <script src="script.js"></script>
* {
  margin: 0;
  padding: 0;
  list-style: none;
  box-sizing: border-box;
  text-decoration: none;
  line-height: 2rem;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Poppins", serif;
  min-height: 100vh;
  background-color: #190033;
}

.snow {
  position: fixed;
  top: -1vh;
  transform: translateY(0);
  animation: fall 3s linear forwards;
  color: beige;
  filter: blur(3px);
  font-size: 16px;
}

@keyframes fall {
  to {
    transform: translateY(105vh);
  }
}
const createSnow = () => {
  const snowFlake = document.createElement("div");
  snowFlake.classList.add("snow");
  snowFlake.textContent = "❄";
  snowFlake.style.fontSize = Math.random() * 20 + 8 + "px";
  snowFlake.style.filter = `blur(${Math.random() * 2}px)`;
  snowFlake.style.left = Math.random() * 100 + "vw";
  snowFlake.style.transform = `rotateZ(${Math.random() * 100}deg)`;
  snowFlake.style.transform = `rotateX(${Math.random() * 100}deg)`;
  snowFlake.style.transform = `rotateY(${Math.random() * 100}deg)`;
  snowFlake.style.animationDuration = Math.random() * 2 + 3 + "s";

  document.body.appendChild(snowFlake);
  setTimeout(() => {
    snowFlake.remove();
  }, 5000);
};

setInterval(createSnow, 700);

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.