How to add some .json to make background dynamic?

Hi community,

I am new to webflow, also fairly new to coding (learning by myself for about a few months)…I would like to make my website’s background dynamic, example: particles.js - A lightweight JavaScript library for creating particles
How can I create this background?

This is my project, I am still working on it :slight_smile:
https://preview.webflow.com/preview/daphnes-sublime-project?preview=374a4f08a5b7c8cd4460e490b726235b

Here you go :slight_smile: - http://particles-js.webflow.io/

Hope it helps!

1 Like

:open_mouth: Amazing!!!

I went to the website and explore the custom code, but it doesn’t work.
However, if I use your code directly, it works.
I wonder what is missing?

{
“particles”: {
“number”: {
“value”: 47,
“density”: {
“enable”: true,
“value_area”: 552.4033491425909
}
},
“color”: {
“value”: “#d500f9
},
“shape”: {
“type”: “circle”,
“stroke”: {
“width”: 0,
“color”: “#000000
},
“polygon”: {
“nb_sides”: 6
},
“image”: {
“src”: “img/github.svg”,
“width”: 100,
“height”: 100
}
},
“opacity”: {
“value”: 0.28409315098761817,
“random”: false,
“anim”: {
“enable”: false,
“speed”: 1,
“opacity_min”: 0.1,
“sync”: false
}
},
“size”: {
“value”: 2,
“random”: true,
“anim”: {
“enable”: false,
“speed”: 40,
“size_min”: 0.1,
“sync”: false
}
},
“line_linked”: {
“enable”: true,
“distance”: 125,
“color”: “#d500f9”,
“opacity”: 0.16572100474277726,
“width”: 1.6
},
“move”: {
“enable”: true,
“speed”: 6,
“direction”: “none”,
“random”: false,
“straight”: false,
“out_mode”: “out”,
“bounce”: false,
“attract”: {
“enable”: false,
“rotateX”: 600,
“rotateY”: 1200
}
}
},
“interactivity”: {
“detect_on”: “canvas”,
“events”: {
“onhover”: {
“enable”: true,
“mode”: “repulse”
},
“onclick”: {
“enable”: false,
“mode”: “push”
},
“resize”: true
},
“modes”: {
“grab”: {
“distance”: 400,
“line_linked”: {
“opacity”: 1
}
},
“bubble”: {
“distance”: 400,
“size”: 40,
“duration”: 2,
“opacity”: 8,
“speed”: 3
},
“repulse”: {
“distance”: 200,
“duration”: 0.4
},
“push”: {
“particles_nb”: 4
},
“remove”: {
“particles_nb”: 2
}
}
},
“retina_detect”: true
}


I am also unable to run it on my website
please help!