![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/86af82705ba0163047015f5c81aa8774.gif)
<style>
html,
body {
margin: 0;
background-image: url("./images/1.jpg");
overflow: hidden;
}
.snowfall-flakes {
margin: 20px auto;
position: relative;
}
.snowfall-flakes:before,
.snowfall-flakes:after {
width: 10px;
height: 16px;
background-color: red;
border-radius: 5px 5px 0 0;
position: absolute;
top: 0;
left: 0
}
.snowfall-flakes:before {
content: "";
transform: rotate(-45deg)
}
.snowfall-flakes:after {
content: "";
transform: translate(4.5px) rotate(45deg);
}
</style>
<body>
<!-- 这里类名一定要使用snowfall.js提供的类名 snowfall-flakes-->
<div class="snowfall-flakes"></div>
<!-- 引入第三方库 -->
<script src="./js/jquery.js"></script>
<script src="./js/snowfall.js"></script>
<script>
$(document).snowfall({
flakeCount: 100,
maxSpeed: 10,
});
</script>
</body>