<!DOCTYPE HTML>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>snowfall.js를 사용한 눈내리는 효과</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/JQuery-Snowfall/1.7.4/snowfall.jquery.min.js"></script>
<style>
* { margin: 0; padding: 0; box-sizing: border-box;}
body, html {
width: 100%;
height: 100%;
background: #2d0f0f;
}
.container img {
position: absolute;
left: 50%;
bottom: 0;
margin-left: -513px;
}
</style>
</head>
<body>
<div class="container">
<img src="./smashing.jpg" alt="">
<script>
$(document).ready(function(){
$(document).snowfall({
image :"./flake.png",
minSize: 3,
maxSize:10,
flakeCount : 120
});
});
</script>
</body>
</html>
출처: github.com/loktar00/JQuery-Snowfall