<div id="snowfall"></div>
* {
margin: 0;
padding: 0;
}
canvas {
display: block;
}
#snowfall {
width: 100%;
height: 100vh;
background: cornflowerblue;
}
xxxxxxxxxx
const snowflakes = {
"particles": {
"number": {
"value": 100
},
"shape": {
"type": "circle"
},
"size": {
"value": 10,
"random": true
},
"line_linked": {
"enable": false
},
"move": {
"enable": true,
"speed": 2,
"direction": "bottom",
"straight": false
}
},
"interactivity": {
}
}
particlesJS("snowfall", snowflakes);
This Pen doesn't use any external CSS resources.