particles js 使用
<div id="particles-js" style="left: 0; right: 0; position: fixed;z-index: -1"></div>
<script src="//cdn.bootcss.com/particles.js/1.0.2/particles.min.js"></script>
particlesJS('particles-js', {
particles: {
color: '#ccc',
shape: 'circle', // "circle", "edge" or "triangle"
opacity: 3,
size: 5,
size_random: true,
nb: 150,
line_linked: {
enable_auto: true,
distance: 200,
color: '#ccc',
opacity: 1,
width: 1,
condensed_mode: {
enable: false,
rotateX: 600,
rotateY: 600
}
},
anim: {
enable: true,
speed: 1
}
},
interactivity: {
enable: false,
mouse: {
distance: 250
},
detect_on: 'canvas', // "canvas" or "window"
mode: 'grab',
line_linked: {
opacity: .5
}
},
/* Retina Display Support */
retina_detect: true
});
定,精,简,俭