The rendering is as follows: There is a problem when recording gif, so don’t worry about the clarity.
Introduce third-party js:
You can download it from the official website, or click here to pick it up: https://download.csdn.net/download/tt18473481961/87555035
<script type="text/javascript" src="js/snowfall.jquery.js"></script>
Initialization code:
$(document).snowfall({
image: "./images/img1.png", // 图片
flakeCount:5,
minSize: 5, //最小体积
minSpeed:1, // 最小速度
// maxSpeed:6, //最大速度
maxSize: 12 // 最大体积
});